diff options
author | Erik Johnston <erik@matrix.org> | 2021-04-01 16:55:59 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2021-04-01 16:55:59 +0100 |
commit | 0f82904fddb858af99be40ec907d61e0a1c79ece (patch) | |
tree | 4d4ca3ac10e04675a6a0861aa4c328f3cedb39b4 | |
parent | Only evict 100 at once (diff) | |
download | synapse-0f82904fddb858af99be40ec907d61e0a1c79ece.tar.xz |
fixup
-rw-r--r-- | synapse/util/caches/lrucache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py index 96d3ce5a43..3639cba2da 100644 --- a/synapse/util/caches/lrucache.py +++ b/synapse/util/caches/lrucache.py @@ -182,6 +182,9 @@ class LruCache(Generic[KT, VT]): ): i += 1 todelete = list_root.prev_node + if list_root == todelete: + break + evicted_len = delete_node(todelete) cache.pop(todelete.key, None) if metrics: |