diff options
author | Erik Johnston <erik@matrix.org> | 2017-05-31 15:46:36 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-05-31 15:46:36 +0100 |
commit | 304880d18545b59a51c5d4b928e563c6d1514fdc (patch) | |
tree | 38c43a4062f1a283f3d689784fadaee2a6bfc0ea /synapse/storage/user_directory.py | |
parent | Split out directory and search tables (diff) | |
download | synapse-304880d18545b59a51c5d4b928e563c6d1514fdc.tar.xz |
Add stream change cache
Diffstat (limited to 'synapse/storage/user_directory.py')
-rw-r--r-- | synapse/storage/user_directory.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py index b1957cb873..15b8ea0460 100644 --- a/synapse/storage/user_directory.py +++ b/synapse/storage/user_directory.py @@ -204,7 +204,9 @@ class UserDirectoryStore(SQLBaseStore): ) def get_current_state_deltas(self, prev_stream_id): - # TODO: Add stream change cache + if not self._curr_state_delta_stream_cache.has_any_entity_changed(prev_stream_id): + return [] + # TODO: Add limit sql = """ SELECT stream_id, room_id, type, state_key, event_id, prev_event_id |