Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit d1794a0

Browse files
committed
Move rooms for user state cache invalidation into base
1 parent 43439b6 commit d1794a0

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

synapse/storage/_base.py

+3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def _invalidate_state_caches(
8888
self._attempt_to_invalidate_cache(
8989
"get_user_in_room_with_profile", (room_id, user_id)
9090
)
91+
self._attempt_to_invalidate_cache(
92+
"get_rooms_for_user_with_stream_ordering", (user_id,)
93+
)
9194

9295
# Purge other caches based on room state.
9396
self._attempt_to_invalidate_cache("get_room_summary", (room_id,))

synapse/storage/databases/main/events.py

-7
Original file line numberDiff line numberDiff line change
@@ -1197,13 +1197,6 @@ def _update_current_state_txn(
11971197
)
11981198

11991199
# Invalidate the various caches
1200-
1201-
for member in members_changed:
1202-
txn.call_after(
1203-
self.store.get_rooms_for_user_with_stream_ordering.invalidate,
1204-
(member,),
1205-
)
1206-
12071200
self.store._invalidate_state_caches_and_stream(
12081201
txn, room_id, members_changed
12091202
)

0 commit comments

Comments
 (0)