diff options
author | Erik Johnston <erikj@jki.re> | 2017-01-18 14:57:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 14:57:54 +0000 |
commit | 841c2285331bc09d069df8e70bbe1c0a2a959024 (patch) | |
tree | 824d639ef2dd4547ef262386b1d51a152f470a82 /synapse/util/caches/lrucache.py | |
parent | Merge pull request #1811 from aperezdc/unhardcode-riot-urls (diff) | |
parent | Update LruCache size estimate on clear (diff) | |
download | synapse-841c2285331bc09d069df8e70bbe1c0a2a959024.tar.xz |
Merge pull request #1828 from matrix-org/erikj/iterable_cache_size
Update LruCache size estimate on clear
Diffstat (limited to 'synapse/util/caches/lrucache.py')
-rw-r--r-- | synapse/util/caches/lrucache.py | 2 |
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): |