mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Invalidate the caches from the correct thread
This commit is contained in:
parent
261d809a47
commit
a9aea68fd5
6 changed files with 46 additions and 29 deletions
|
@ -35,7 +35,7 @@ RoomsForUser = namedtuple(
|
|||
|
||||
class RoomMemberStore(SQLBaseStore):
|
||||
|
||||
def _store_room_member_txn(self, txn, event):
|
||||
def _store_room_member_txn(self, txn, invalidates, event):
|
||||
"""Store a room member in the database.
|
||||
"""
|
||||
try:
|
||||
|
@ -64,8 +64,10 @@ class RoomMemberStore(SQLBaseStore):
|
|||
}
|
||||
)
|
||||
|
||||
self.get_rooms_for_user.invalidate(target_user_id)
|
||||
self.get_joined_hosts_for_room.invalidate(event.room_id)
|
||||
invalidates.extend([
|
||||
(self.get_rooms_for_user.invalidate, target_user_id),
|
||||
(self.get_joined_hosts_for_room.invalidate, event.room_id),
|
||||
])
|
||||
|
||||
def get_room_member(self, user_id, room_id):
|
||||
"""Retrieve the current state of a room member.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue