summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/directory.py5
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):