diff options
author | Erik Johnston <erik@matrix.org> | 2018-03-05 15:12:22 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-03-05 15:29:03 +0000 |
commit | 69ce365b793ac35c8e9ee6c3b3a0d04d0e61db4f (patch) | |
tree | 16679dbecba2b332ff12a22c85bd9454e86df395 /synapse | |
parent | Split Directory store (diff) | |
download | synapse-69ce365b793ac35c8e9ee6c3b3a0d04d0e61db4f.tar.xz |
Fix cache invalidation on deletion
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/directory.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/directory.py b/synapse/storage/directory.py index 041b0b457e..d0c0059757 100644 --- a/synapse/storage/directory.py +++ b/synapse/storage/directory.py @@ -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): |