Fix cache invalidation on deletion

This commit is contained in:
Erik Johnston 2018-03-05 15:12:22 +00:00
parent 2e223163ff
commit 69ce365b79
1 changed files with 4 additions and 1 deletions

View File

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