summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-03-25 16:59:27 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-03-25 19:06:05 +0000
commit033a517febc434269eefc75e4d9646d015beae54 (patch)
tree6c1fab8024ea40d072b5e348bdaff794174389d7 /synapse/storage/_base.py
parentAllow a choice of LRU behaviour for Cache() by using LruCache() or OrderedDict() (diff)
downloadsynapse-033a517febc434269eefc75e4d9646d015beae54.tar.xz
Indirect invalidations of _get_event_cache via a helper method to keep all uses of the cache lexically within one .py file
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 6fa63f052e..374db1a304 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -732,6 +732,9 @@ class SQLBaseStore(object):
 
         return [e for e in events if e]
 
+    def _invalidate_get_event_cache(self, event_id):
+        self._get_event_cache.pop(event_id)
+
     def _get_event_txn(self, txn, event_id, check_redacted=True,
                        get_prev_content=False, allow_rejected=False):