Only invalidate membership caches based on the cache stream

Before we completely invalidated get_users_in_room whenever we updated
any current_state_events table. This was way too aggressive.
This commit is contained in:
Erik Johnston 2017-01-31 16:09:03 +00:00
parent ac001dabdc
commit 458b6f4733
4 changed files with 5 additions and 41 deletions

View file

@ -66,8 +66,6 @@ class RoomMemberStore(SQLBaseStore):
)
for event in events:
txn.call_after(self.get_rooms_for_user.invalidate, (event.state_key,))
txn.call_after(self.get_users_in_room.invalidate, (event.room_id,))
txn.call_after(
self._membership_stream_cache.entity_has_changed,
event.state_key, event.internal_metadata.stream_ordering