summary refs log tree commit diff
path: root/synapse/util/caches/lrucache.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-04-01 18:02:06 +0100
committerErik Johnston <erik@matrix.org>2021-04-01 18:02:06 +0100
commit8d308066db79705f147ed54797d82f606eb20db1 (patch)
treea3efe5539791e72cb1136de186de49a8c85dc7d6 /synapse/util/caches/lrucache.py
parentfixup (diff)
downloadsynapse-8d308066db79705f147ed54797d82f606eb20db1.tar.xz
fixup
Diffstat (limited to 'synapse/util/caches/lrucache.py')
-rw-r--r--synapse/util/caches/lrucache.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py
index 5a0f9992c5..47998d6f07 100644
--- a/synapse/util/caches/lrucache.py
+++ b/synapse/util/caches/lrucache.py
@@ -292,9 +292,10 @@ class LruCache(Generic[KT, VT]):
                 ten_minutes_ago = int(reactor.seconds()) - 10 * 60
                 if 0 < node.allocated_ts < ten_minutes_ago:
                     delete_node(node)
+                    cache.pop(node.key, None)
                 else:
                     move_node_to_front(node)
-                node.callbacks.update(callbacks)
+                    node.callbacks.update(callbacks)
                 if update_metrics and metrics:
                     metrics.inc_hits()
                 return node.value