mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Add caches for things requested by the pushers
This commit is contained in:
parent
d61ce3f670
commit
53447e9cd3
7 changed files with 45 additions and 34 deletions
|
@ -66,6 +66,7 @@ class RoomMemberStore(SQLBaseStore):
|
|||
|
||||
txn.call_after(self.get_rooms_for_user.invalidate, target_user_id)
|
||||
txn.call_after(self.get_joined_hosts_for_room.invalidate, event.room_id)
|
||||
txn.call_after(self.get_users_in_room.invalidate, event.room_id)
|
||||
|
||||
def get_room_member(self, user_id, room_id):
|
||||
"""Retrieve the current state of a room member.
|
||||
|
@ -87,6 +88,7 @@ class RoomMemberStore(SQLBaseStore):
|
|||
|
||||
return self.runInteraction("get_room_member", f)
|
||||
|
||||
@cached()
|
||||
def get_users_in_room(self, room_id):
|
||||
def f(txn):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue