summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-13 17:46:17 +0000
committerErik Johnston <erik@matrix.org>2017-01-13 17:46:17 +0000
commit2fae34bd2ce152b8544d5a90fe3b35281c5fffbc (patch)
treee921c8cdc97983700794520e5426996ef104a2f7 /synapse/storage/roommember.py
parentMerge pull request #1810 from matrix-org/erikj/state_auth_splitout_split (diff)
downloadsynapse-2fae34bd2ce152b8544d5a90fe3b35281c5fffbc.tar.xz
Optionally measure size of cache by sum of length of values
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 5d18037c7c..e63aab6ccf 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -390,7 +390,8 @@ class RoomMemberStore(SQLBaseStore):
             room_id, state_group, state_ids,
         )
 
-    @cachedInlineCallbacks(num_args=2, cache_context=True)
+    @cachedInlineCallbacks(num_args=2, cache_context=True, iterable=True,
+                           max_entries=2000)
     def _get_joined_users_from_context(self, room_id, state_group, current_state_ids,
                                        cache_context, event=None):
         # We don't use `state_group`, it's there so that we can cache based