diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-06-04 17:19:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 17:19:33 +0100 |
commit | 28b0490dfdce04c584d36ae409abc42b6ac419b2 (patch) | |
tree | 4f42fe1eaf4a2214d8e64721b446930e91ca6863 /synapse/util/caches/descriptors.py | |
parent | Fix replication metrics (diff) | |
parent | Add hacky cache factor override system (diff) | |
download | synapse-28b0490dfdce04c584d36ae409abc42b6ac419b2.tar.xz |
Merge pull request #3334 from matrix-org/rav/cache_factor_override
Cache factor override system for specific caches
Diffstat (limited to 'synapse/util/caches/descriptors.py')
-rw-r--r-- | synapse/util/caches/descriptors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/caches/descriptors.py b/synapse/util/caches/descriptors.py index fc1874b65b..65a1042de1 100644 --- a/synapse/util/caches/descriptors.py +++ b/synapse/util/caches/descriptors.py @@ -17,7 +17,7 @@ import logging from synapse.util.async import ObservableDeferred from synapse.util import unwrapFirstError, logcontext -from synapse.util.caches import CACHE_SIZE_FACTOR +from synapse.util.caches import get_cache_factor_for from synapse.util.caches.lrucache import LruCache from synapse.util.caches.treecache import TreeCache, iterate_tree_cache_entry from synapse.util.stringutils import to_ascii @@ -313,7 +313,7 @@ class CacheDescriptor(_CacheDescriptorBase): orig, num_args=num_args, inlineCallbacks=inlineCallbacks, cache_context=cache_context) - max_entries = int(max_entries * CACHE_SIZE_FACTOR) + max_entries = int(max_entries * get_cache_factor_for(orig.__name__)) self.max_entries = max_entries self.tree = tree |