Add caches for things requested by the pushers

This commit is contained in:
Mark Haines 2015-05-21 15:14:26 +01:00
parent d61ce3f670
commit 53447e9cd3
7 changed files with 45 additions and 34 deletions

View file

@ -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):