summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-30 16:47:38 +0100
committerErik Johnston <erik@matrix.org>2015-04-30 16:47:51 +0100
commit69d40636517d0634e6e4c598d6897bf367b1d634 (patch)
treed679456da0df2acda6573f547cd3e47bd2c5d151
parentUndo changes to logger config, ie. remove the access_log_file option: decisio... (diff)
downloadsynapse-69d40636517d0634e6e4c598d6897bf367b1d634.tar.xz
Add get_rooms_for_user cache
Diffstat (limited to '')
-rw-r--r--synapse/storage/roommember.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 8ea5756d61..831169e220 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -65,6 +65,7 @@ class RoomMemberStore(SQLBaseStore):
         )
 
         self.get_rooms_for_user.invalidate(target_user_id)
+        self.get_joined_hosts_for_room.invalidate(event.room_id)
 
     def get_room_member(self, user_id, room_id):
         """Retrieve the current state of a room member.
@@ -162,6 +163,7 @@ class RoomMemberStore(SQLBaseStore):
             RoomsForUser(**r) for r in self.cursor_to_dict(txn)
         ]
 
+    @cached()
     def get_joined_hosts_for_room(self, room_id):
         return self.runInteraction(
             "get_joined_hosts_for_room",