summary refs log tree commit diff
path: root/synapse/replication/slave
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-24 13:21:08 +0000
committerErik Johnston <erik@matrix.org>2017-03-24 13:21:08 +0000
commit09f79aaad02ee640b22e7762f28a0b6885b9593b (patch)
treefbed0e2dc72fb988f059dfde5a7b6d971b89dbfb /synapse/replication/slave
parentAdd slave transaction store (diff)
downloadsynapse-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/replication/slave')
-rw-r--r--synapse/replication/slave/storage/presence.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/replication/slave/storage/presence.py b/synapse/replication/slave/storage/presence.py
index 40f6c9a386..e4a2414d78 100644
--- a/synapse/replication/slave/storage/presence.py
+++ b/synapse/replication/slave/storage/presence.py
@@ -57,5 +57,6 @@ class SlavedPresenceStore(BaseSlavedStore):
                 self.presence_stream_cache.entity_has_changed(
                     user_id, position
                 )
+                self._get_presence_for_user.invalidate((user_id,))
 
         return super(SlavedPresenceStore, self).process_replication(result)