summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-01-31 13:23:24 +0000
committerGitHub <noreply@github.com>2017-01-31 13:23:24 +0000
commitbfb3d255b1c8da0a74518168c462bd8ff7ddca2c (patch)
tree307215cef37e1f5b617bd795df33b375fccc8439 /synapse/storage
parentMerge pull request #1861 from matrix-org/erikj/device_list_fixes (diff)
parentStream cache invalidations for room membership storage functions (diff)
downloadsynapse-bfb3d255b1c8da0a74518168c462bd8ff7ddca2c.tar.xz
Merge pull request #1862 from matrix-org/erikj/presence_update
Use DB cache of joined users for presence
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/events.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 8712d7e18c..6685b9da1c 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -564,9 +564,13 @@ class EventsStore(SQLBaseStore):
                 )
 
                 for member in members_changed:
-                    txn.call_after(self.get_rooms_for_user.invalidate, (member,))
+                    self._invalidate_cache_and_stream(
+                        txn, self.get_rooms_for_user, (member,)
+                    )
 
-                txn.call_after(self.get_users_in_room.invalidate, (room_id,))
+                self._invalidate_cache_and_stream(
+                    txn, self.get_users_in_room, (room_id,)
+                )
 
                 # Add an entry to the current_state_resets table to record the point
                 # where we clobbered the current state