summary refs log tree commit diff
path: root/synapse/util/caches
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-18 14:55:23 +0000
committerErik Johnston <erik@matrix.org>2017-01-18 14:55:23 +0000
commitc430111d0e6efb6a0f929cc3e10f1ce4f32d2c18 (patch)
tree3ed3fa60eeac457ed88249a4410e6c16b4d79dff /synapse/util/caches
parentMerge pull request #1823 from matrix-org/erikj/load_events_logs (diff)
downloadsynapse-c430111d0e6efb6a0f929cc3e10f1ce4f32d2c18.tar.xz
Update LruCache size estimate on clear
Diffstat (limited to 'synapse/util/caches')
-rw-r--r--synapse/util/caches/lrucache.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py
index 072f9a9d19..cf5fbb679c 100644
--- a/synapse/util/caches/lrucache.py
+++ b/synapse/util/caches/lrucache.py
@@ -189,6 +189,8 @@ class LruCache(object):
                 for cb in node.callbacks:
                     cb()
             cache.clear()
+            if size_callback:
+                cached_cache_len[0] = 0
 
         @synchronized
         def cache_contains(key):