summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-02-11 15:23:28 +0000
committerMark Haines <mark.haines@matrix.org>2015-02-11 15:23:28 +0000
commitddc25cf4e2df10e2b175e70a2371a7e24081572f (patch)
tree0cc90a3a2d4ed5028d913cd1a84e5cdf30438722 /synapse/storage
parentFix formatting (diff)
downloadsynapse-ddc25cf4e2df10e2b175e70a2371a7e24081572f.tar.xz
Invalidate the cache for an event if it is redacted
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 1170d8b6ec..a33e2298f6 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -423,6 +423,8 @@ class DataStore(RoomMemberStore, RoomStore,
         )
 
     def _store_redaction(self, txn, event):
+        # invalidate the cache for the redacted event
+        self._get_event_cache.pop(event.redacts)
         txn.execute(
             "INSERT OR IGNORE INTO redactions "
             "(event_id, redacts) VALUES (?,?)",