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/_base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 42edb56c36..da698cb3b8 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -75,8 +75,7 @@ def cached(max_entries=1000):
             defer.returnValue(ret)
 
         def invalidate(key):
-            if key in cache:
-                del cache[key]
+            cache.pop(key, None)
 
         wrapped.invalidate = invalidate
         wrapped.prefill = prefill