Ejemplo n.º 1
0
 def set_acls_in_room_for_action(self, room_id: str, action: str,
                                 acls: dict) -> None:
     key = RedisKeys.acls_in_room_for_action(room_id, action)
     self.cache.set(key,
                    acls,
                    ttl=TEN_MINUTES + random.random() * TEN_MINUTES)
Ejemplo n.º 2
0
 def reset_acls_in_room_for_action(self, room_id: str, action: str) -> None:
     key = RedisKeys.acls_in_room_for_action(room_id, action)
     self.cache.delete(key)
Ejemplo n.º 3
0
 def get_acls_in_room_for_action(self, room_id: str, action: str) -> dict:
     key = RedisKeys.acls_in_room_for_action(room_id, action)
     return self.cache.get(key)