mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:04:53 -04:00
Improve caching for read_marker API
We add a new storage function to get a paritcular type of room account data. This allows us to prefill the cache when updating that acount data.
This commit is contained in:
parent
33bebb63f3
commit
a83c514d1f
3 changed files with 41 additions and 3 deletions
|
@ -57,6 +57,9 @@ class SlavedAccountDataStore(TagsWorkerStore, AccountDataWorkerStore, BaseSlaved
|
|||
)
|
||||
self.get_account_data_for_user.invalidate((row.user_id,))
|
||||
self.get_account_data_for_room.invalidate((row.user_id, row.room_id,))
|
||||
self.get_account_data_for_room_and_type.invalidate(
|
||||
(row.user_id, row.room_id, row.account_data_type,),
|
||||
)
|
||||
self._account_data_stream_cache.entity_has_changed(
|
||||
row.user_id, token
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue