mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-21 10:28:47 -04:00
Combine LruCache.invalidate
and invalidate_many
(#9973)
* Make `invalidate` and `invalidate_many` do the same thing ... so that we can do either over the invalidation replication stream, and also because they always confused me a bit. * Kill off `invalidate_many` * changelog
This commit is contained in:
parent
f42e4c4eb9
commit
224f2f949b
12 changed files with 52 additions and 52 deletions
|
@ -1748,9 +1748,9 @@ class PersistEventsStore:
|
|||
},
|
||||
)
|
||||
|
||||
txn.call_after(self.store.get_relations_for_event.invalidate_many, (parent_id,))
|
||||
txn.call_after(self.store.get_relations_for_event.invalidate, (parent_id,))
|
||||
txn.call_after(
|
||||
self.store.get_aggregation_groups_for_event.invalidate_many, (parent_id,)
|
||||
self.store.get_aggregation_groups_for_event.invalidate, (parent_id,)
|
||||
)
|
||||
|
||||
if rel_type == RelationTypes.REPLACE:
|
||||
|
@ -1903,7 +1903,7 @@ class PersistEventsStore:
|
|||
|
||||
for user_id in user_ids:
|
||||
txn.call_after(
|
||||
self.store.get_unread_event_push_actions_by_room_for_user.invalidate_many,
|
||||
self.store.get_unread_event_push_actions_by_room_for_user.invalidate,
|
||||
(room_id, user_id),
|
||||
)
|
||||
|
||||
|
@ -1917,7 +1917,7 @@ class PersistEventsStore:
|
|||
def _remove_push_actions_for_event_id_txn(self, txn, room_id, event_id):
|
||||
# Sad that we have to blow away the cache for the whole room here
|
||||
txn.call_after(
|
||||
self.store.get_unread_event_push_actions_by_room_for_user.invalidate_many,
|
||||
self.store.get_unread_event_push_actions_by_room_for_user.invalidate,
|
||||
(room_id,),
|
||||
)
|
||||
txn.execute(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue