diff options
author | Erik Johnston <erikj@jki.re> | 2017-05-05 10:19:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-05 10:19:05 +0100 |
commit | e3aa8a7aa89ff26cd84d61fe11331fab5b314a78 (patch) | |
tree | fb13789d547c2c4e0879bef87e67164b8e7df846 /synapse/storage/roommember.py | |
parent | Merge pull request #2174 from matrix-org/erikj/current_cache_hosts (diff) | |
parent | Optimise caches with single key (diff) | |
download | synapse-e3aa8a7aa89ff26cd84d61fe11331fab5b314a78.tar.xz |
Merge pull request #2185 from matrix-org/erikj/smaller_caches
Optimise caches for single key
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 6ec8a6345d..6f75c61778 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -148,7 +148,7 @@ class RoomMemberStore(SQLBaseStore): hosts = frozenset(get_domain_from_id(user_id) for user_id in user_ids) defer.returnValue(hosts) - @cached(max_entries=500000, iterable=True) + @cached(max_entries=100000, iterable=True) def get_users_in_room(self, room_id): def f(txn): sql = ( @@ -161,7 +161,7 @@ class RoomMemberStore(SQLBaseStore): ) txn.execute(sql, (room_id, Membership.JOIN,)) - return [r[0] for r in txn] + return [to_ascii(r[0]) for r in txn] return self.runInteraction("get_users_in_room", f) @cached() |