Exemplo n.º 1
0
 def set_all_acls_for_room(self, room_id: str, acls: dict) -> None:
     key = RedisKeys.acls_in_room(room_id)
     self.cache.set(key,
                    acls,
                    ttl=FIVE_MINUTES + random.random() * FIVE_MINUTES)
Exemplo n.º 2
0
 def get_all_acls_for_room(self, room_id: str) -> dict:
     key = RedisKeys.acls_in_room(room_id)
     return self.cache.get(key)
Exemplo n.º 3
0
 def reset_acls_in_room(self, room_id: str) -> None:
     key = RedisKeys.acls_in_room(room_id)
     self.cache.delete(key)