Skip to content
Snippets Groups Projects
Commit 841c2285 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #1828 from matrix-org/erikj/iterable_cache_size

Update LruCache size estimate on clear
parents 97d39183 c430111d
No related branches found
No related tags found
No related merge requests found
...@@ -189,6 +189,8 @@ class LruCache(object): ...@@ -189,6 +189,8 @@ class LruCache(object):
for cb in node.callbacks: for cb in node.callbacks:
cb() cb()
cache.clear() cache.clear()
if size_callback:
cached_cache_len[0] = 0
@synchronized @synchronized
def cache_contains(key): def cache_contains(key):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment