mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-21 06:14:06 -04:00
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.
This commit is contained in:
parent
f34b0bc262
commit
6b4593a80f
4 changed files with 52 additions and 119 deletions
|
@ -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,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue