diff options
author | Erik Johnston <erik@matrix.org> | 2016-12-12 14:41:51 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-12-12 14:41:51 +0000 |
commit | 09cbcb78d3f474ada72d604a24a44c91f2fdb6fe (patch) | |
tree | 4ec07e03d751f3c2007db333abde79f13683639a /synapse/storage | |
parent | Notify replication. Use correct network_id (diff) | |
download | synapse-09cbcb78d3f474ada72d604a24a44c91f2fdb6fe.tar.xz |
Add cache to get_public_room_ids_at_stream_id
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/room.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 36aa8c5f83..8a2fe2fdf5 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -16,6 +16,7 @@ from twisted.internet import defer from synapse.api.errors import StoreError +from synapse.util.caches.descriptors import cached from ._base import SQLBaseStore from .engines import PostgresEngine, Sqlite3Engine @@ -346,6 +347,7 @@ class RoomStore(SQLBaseStore): def get_current_public_room_stream_id(self): return self._public_room_id_gen.get_current_token() + @cached(num_args=2, max_entries=100) def get_public_room_ids_at_stream_id(self, stream_id, network_tuple): """Get pulbic rooms for a particular list, or across all lists. |