summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-06-13 10:58:53 +0100
committerGitHub <noreply@github.com>2017-06-13 10:58:53 +0100
commitfdca6e36ee66b01ebbc7325e42fb811c1aec5b25 (patch)
treeda27a8f8e272b88ede975d25b592c7b2e29b4508 /synapse/storage/events.py
parentMerge pull request #2275 from matrix-org/erikj/tweark_user_directory_search (diff)
parentAdd cache for is_host_joined (diff)
downloadsynapse-fdca6e36ee66b01ebbc7325e42fb811c1aec5b25.tar.xz
Merge pull request #2274 from matrix-org/erikj/cache_is_host_joined
Add cache for is_host_joined
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py5
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,)
                 )