0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-16 06:51:46 +01:00

Update LruCache size estimate on clear

This commit is contained in:
Erik Johnston 2017-01-18 14:55:23 +00:00
parent ae7b4da4cc
commit c430111d0e

View file

@ -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):