diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-01 15:05:06 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-01 15:05:06 +0000 |
commit | 2d3837bec7d1f721176879dd371baa9d3ab6465d (patch) | |
tree | 2655f4c8f789d5e68448b9239a56e4cac7c209fc /synapse/storage/stream.py | |
parent | Merge pull request #544 from matrix-org/erikj/stream_rooms (diff) | |
parent | Cache get_room_changes_for_user (diff) | |
download | synapse-2d3837bec7d1f721176879dd371baa9d3ab6465d.tar.xz |
Merge pull request #543 from matrix-org/erikj/sync
Cache get_room_changes_for_user
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/stream.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index a60e662f7d..8dc8f5c640 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -252,6 +252,13 @@ class StreamStore(SQLBaseStore): if from_key == to_key: return defer.succeed([]) + if from_id: + has_changed = self._membership_stream_cache.has_entity_changed( + user_id, int(from_id) + ) + if not has_changed: + return defer.succeed([]) + def f(txn): if from_id is not None: sql = ( |