mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:44:49 -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
|
@ -41,9 +41,9 @@ class ReadMarkerHandler(BaseHandler):
|
|||
"""
|
||||
|
||||
with (yield self.read_marker_linearizer.queue((room_id, user_id))):
|
||||
account_data = yield self.store.get_account_data_for_room(user_id, room_id)
|
||||
|
||||
existing_read_marker = account_data.get("m.fully_read", None)
|
||||
existing_read_marker = yield self.store.get_account_data_for_room_and_type(
|
||||
user_id, room_id, "m.fully_read",
|
||||
)
|
||||
|
||||
should_update = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue