summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-11 16:43:26 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-11 16:43:26 +0000
commitf2fdcb7c4bb09b447a31985d8b3f3989dac8c0a4 (patch)
tree96cfd120f7bdb70c1045a8080f4f97f3a30bd574 /synapse/storage/__init__.py
parentMinor tweaks based on PR feedback. (diff)
parentMerge branch 'bugs/SYN-264' into develop (diff)
downloadsynapse-f2fdcb7c4bb09b447a31985d8b3f3989dac8c0a4.tar.xz
Merge branch 'develop' into application-services
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 2225be96be..4b618e0c65 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -167,6 +167,9 @@ class DataStore(RoomMemberStore, RoomStore,
                            stream_ordering=None, is_new_state=True,
                            current_state=None):
 
+        # Remove the any existing cache entries for the event_id
+        self._get_event_cache.pop(event.event_id)
+
         # We purposefully do this first since if we include a `current_state`
         # key, we *want* to update the `current_state_events` table
         if current_state:
@@ -423,6 +426,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 (?,?)",