diff options
author | Erik Johnston <erik@matrix.org> | 2021-04-01 18:02:06 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2021-04-01 18:02:06 +0100 |
commit | 8d308066db79705f147ed54797d82f606eb20db1 (patch) | |
tree | a3efe5539791e72cb1136de186de49a8c85dc7d6 /synapse/util/caches/lrucache.py | |
parent | fixup (diff) | |
download | synapse-8d308066db79705f147ed54797d82f606eb20db1.tar.xz |
fixup
Diffstat (limited to 'synapse/util/caches/lrucache.py')
-rw-r--r-- | synapse/util/caches/lrucache.py | 3 |
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 |