summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-11 17:01:38 +0000
committerErik Johnston <erik@matrix.org>2015-02-11 17:01:38 +0000
commit42bc56dad3b9ba9920d6cec364ddda8f1bc93f7e (patch)
treeb041e953b846e742438ae99de330462612273c6a /synapse/storage/__init__.py
parentpyflakes (diff)
parentAllow newer versions of syutil (diff)
downloadsynapse-42bc56dad3b9ba9920d6cec364ddda8f1bc93f7e.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into use-simplejson
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 a0284d54b9..02b1f06854 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -163,6 +163,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:
@@ -426,6 +429,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 (?,?)",