diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-21 15:14:26 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-21 16:41:39 +0100 |
commit | 53447e9cd380262c16677cfddeda1d75aeebe38c (patch) | |
tree | cf563422554aa7308b9df7ee9f0b13fd3a88b33d /synapse/storage/roommember.py | |
parent | Add a cache for get_current_state with state_key (diff) | |
download | synapse-53447e9cd380262c16677cfddeda1d75aeebe38c.tar.xz |
Add caches for things requested by the pushers
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 839c74f63a..3691eade05 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -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): |