diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-08-13 17:27:53 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-08-13 17:27:53 +0100 |
commit | c5966b2a97090bf5b1e2ced83e3f424a3f4d4cad (patch) | |
tree | 3cc3a75259e130906b963570e2c747f5ab0cba2d /synapse/storage/roommember.py | |
parent | Add a few strategic new lines to break up the on_query_client_keys and on_cla... (diff) | |
parent | Merge pull request #224 from matrix-org/erikj/reactor_metrics (diff) | |
download | synapse-c5966b2a97090bf5b1e2ced83e3f424a3f4d4cad.tar.xz |
Merge remote-tracking branch 'origin/develop' into markjh/end-to-end-key-federation
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 4db07f6fb4..9f14f38f24 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -54,9 +54,9 @@ class RoomMemberStore(SQLBaseStore): ) for event in events: - txn.call_after(self.get_rooms_for_user.invalidate, event.state_key) - 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) + txn.call_after(self.get_rooms_for_user.invalidate, (event.state_key,)) + 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. @@ -78,7 +78,7 @@ class RoomMemberStore(SQLBaseStore): lambda events: events[0] if events else None ) - @cached() + @cached(max_entries=5000) def get_users_in_room(self, room_id): def f(txn): @@ -154,7 +154,7 @@ class RoomMemberStore(SQLBaseStore): RoomsForUser(**r) for r in self.cursor_to_dict(txn) ] - @cached() + @cached(max_entries=5000) def get_joined_hosts_for_room(self, room_id): return self.runInteraction( "get_joined_hosts_for_room", |