def get_all_rooms(self) -> Union[List, None]: key = RedisKeys.all_rooms() return self.cache.get(key)
def set_all_rooms(self, all_rooms): key = RedisKeys.all_rooms() self.cache.delete(key) self.cache.set(key, all_rooms, ttl=ONE_MINUTE)