summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorErik Johnston <erikj@element.io>2024-07-19 16:19:15 +0100
committerGitHub <noreply@github.com>2024-07-19 16:19:15 +0100
commitd3f9afd8d9db8c80b342177b9ab162c79357c431 (patch)
tree70eec1581cff3d605db6da7f6f491e179268cf26 /tests
parentGenerate room sync data concurrently (#17458) (diff)
downloadsynapse-d3f9afd8d9db8c80b342177b9ab162c79357c431.tar.xz
Add a cache on `get_rooms_for_local_user_where_membership_is` (#17460)
As it gets used in sliding sync.

We basically invalidate it in all the same places as
`get_rooms_for_user`. Most of the changes are due to needing the
arguments you pass in to be hashable (which lists aren't)
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_sync.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/handlers/test_sync.py b/tests/handlers/test_sync.py
index 77aafa492e..fa55f76916 100644
--- a/tests/handlers/test_sync.py
+++ b/tests/handlers/test_sync.py
@@ -211,6 +211,7 @@ class SyncTestCase(tests.unittest.HomeserverTestCase):
 
         # Blow away caches (supported room versions can only change due to a restart).
         self.store.get_rooms_for_user.invalidate_all()
+        self.store._get_rooms_for_local_user_where_membership_is_inner.invalidate_all()
         self.store._get_event_cache.clear()
         self.store._event_ref.clear()