diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-24 13:21:08 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-24 13:21:08 +0000 |
commit | 09f79aaad02ee640b22e7762f28a0b6885b9593b (patch) | |
tree | fbed0e2dc72fb988f059dfde5a7b6d971b89dbfb /synapse/storage/presence.py | |
parent | Add slave transaction store (diff) | |
download | synapse-09f79aaad02ee640b22e7762f28a0b6885b9593b.tar.xz |
Use presence replication stream to invalidate cache
Instead of using the cache invalidation replication stream to invalidate the _get_presence_cache, we can instead rely on the presence replication stream. This reduces the amount of replication traffic considerably.
Diffstat (limited to 'synapse/storage/presence.py')
-rw-r--r-- | synapse/storage/presence.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py index 4d1590d2b4..4edfe29585 100644 --- a/synapse/storage/presence.py +++ b/synapse/storage/presence.py @@ -85,8 +85,8 @@ class PresenceStore(SQLBaseStore): self.presence_stream_cache.entity_has_changed, state.user_id, stream_id, ) - self._invalidate_cache_and_stream( - txn, self._get_presence_for_user, (state.user_id,) + txn.call_after( + self._get_presence_for_user, (state.user_id,) ) # Actually insert new rows |