def read(self) -> dict:
     """
     Read the list of counties from file storage.
     """
     the_redis = DARedis()
     result = the_redis.get_data(STORE)
     return result
Ejemplo n.º 2
0
 def load(self):
     """
     Load cases from persistant storage.
     """
     the_redis = DARedis()
     cases = the_redis.get_data(self.user_cases_key) or {}
     self.cases = cases
 def read(self) -> dict:
     """
     Read the list of counties from local storage.
     """
     result = None
     try:
         the_redis = DARedis()
         result = the_redis.get_data(STORE)
     except Exception as e:
         logmessage(f"Unable to read cached list of courts: {str(e)}")
     return result
def restore_ls_fields(redis_secret, redis_key):
  r = DARedis()
  encrypted_object_string = r.get_data(redis_key)
  return decrypt_object(encrypted_object_string, redis_secret)
Ejemplo n.º 5
0
def me():
    the_redis = DARedis()
    key = ME_KEY.format(__user_id())
    me = the_redis.get_data(key)
    return me