summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-01-18 14:57:54 +0000
committerGitHub <noreply@github.com>2017-01-18 14:57:54 +0000
commit841c2285331bc09d069df8e70bbe1c0a2a959024 (patch)
tree824d639ef2dd4547ef262386b1d51a152f470a82 /synapse
parentMerge pull request #1811 from aperezdc/unhardcode-riot-urls (diff)
parentUpdate LruCache size estimate on clear (diff)
downloadsynapse-841c2285331bc09d069df8e70bbe1c0a2a959024.tar.xz
Merge pull request #1828 from matrix-org/erikj/iterable_cache_size
Update LruCache size estimate on clear
Diffstat (limited to 'synapse')
-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):