Optionally measure size of cache by sum of length of values

This commit is contained in:
Erik Johnston 2017-01-13 17:46:17 +00:00
parent 95a22ae194
commit 2fae34bd2c
5 changed files with 66 additions and 21 deletions

View file

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