summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorNick Mills-Barrett <nick@beeper.com>2022-09-26 16:26:35 +0100
committerGitHub <noreply@github.com>2022-09-26 16:26:35 +0100
commit6b4593a80fa2fd9ec8e1ec82fad74f3b7fbb9ba3 (patch)
tree39c8f39a45b9bf4e36575fbb2c2c0b2878255808 /synapse/storage/_base.py
parentUpdate NixOS module URL (#13818) (diff)
downloadsynapse-6b4593a80fa2fd9ec8e1ec82fad74f3b7fbb9ba3.tar.xz
Simplify cache invalidation after event persist txn (#13796)
This moves all the invalidations into a single place and de-duplicates
the code involved in invalidating caches for a given event by using
the base class method.
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 303a5d5298..313e8aca7d 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -91,6 +91,9 @@ class SQLBaseStore(metaclass=ABCMeta):
             self._attempt_to_invalidate_cache(
                 "get_user_in_room_with_profile", (room_id, user_id)
             )
+            self._attempt_to_invalidate_cache(
+                "get_rooms_for_user_with_stream_ordering", (user_id,)
+            )
 
         # Purge other caches based on room state.
         self._attempt_to_invalidate_cache("get_room_summary", (room_id,))