0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-18 16:02:15 +01:00

Fix cache invalidation on deletion

This commit is contained in:
Erik Johnston 2018-03-05 15:12:22 +00:00
parent 2e223163ff
commit 69ce365b79

View file

@ -145,7 +145,6 @@ class DirectoryStore(DirectoryWorkerStore):
room_alias, room_alias,
) )
self.get_aliases_for_room.invalidate((room_id,))
defer.returnValue(room_id) defer.returnValue(room_id)
def _delete_room_alias_txn(self, txn, room_alias): def _delete_room_alias_txn(self, txn, room_alias):
@ -170,6 +169,10 @@ class DirectoryStore(DirectoryWorkerStore):
(room_alias.to_string(),) (room_alias.to_string(),)
) )
self._invalidate_cache_and_stream(
txn, self.get_aliases_for_room, (room_id,)
)
return room_id return room_id
def update_aliases_for_room(self, old_room_id, new_room_id, creator): def update_aliases_for_room(self, old_room_id, new_room_id, creator):