diff options
author | Erik Johnston <erik@matrix.org> | 2017-06-13 09:56:18 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-06-13 09:56:18 +0100 |
commit | d53fe399ebb497f67efc99ebb12d96486503629a (patch) | |
tree | d6b1e57629a13036bef7fdca02c5c1c72a40f255 /synapse/storage/events.py | |
parent | Merge pull request #2266 from matrix-org/erikj/host_in_room (diff) | |
download | synapse-d53fe399ebb497f67efc99ebb12d96486503629a.tar.xz |
Add cache for is_host_joined
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index c80d181fc7..72ce84b0b8 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -776,6 +776,11 @@ class EventsStore(SQLBaseStore): txn, self.get_rooms_for_user, (member,) ) + for host in set(get_domain_from_id(u) for u in members_changed): + self._invalidate_cache_and_stream( + txn, self.is_host_joined, (room_id, host) + ) + self._invalidate_cache_and_stream( txn, self.get_users_in_room, (room_id,) ) |