summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-06-04 17:19:33 +0100
committerGitHub <noreply@github.com>2018-06-04 17:19:33 +0100
commit28b0490dfdce04c584d36ae409abc42b6ac419b2 (patch)
tree4f42fe1eaf4a2214d8e64721b446930e91ca6863 /synapse/storage/state.py
parentFix replication metrics (diff)
parentAdd hacky cache factor override system (diff)
downloadsynapse-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/storage/state.py')
-rw-r--r--synapse/storage/state.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index bdee14a8eb..c11bc52177 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -23,7 +23,7 @@ from twisted.internet import defer
 
 from synapse.storage.background_updates import BackgroundUpdateStore
 from synapse.storage.engines import PostgresEngine
-from synapse.util.caches import intern_string, CACHE_SIZE_FACTOR
+from synapse.util.caches import intern_string, get_cache_factor_for
 from synapse.util.caches.descriptors import cached, cachedList
 from synapse.util.caches.dictionary_cache import DictionaryCache
 from synapse.util.stringutils import to_ascii
@@ -57,7 +57,7 @@ class StateGroupWorkerStore(SQLBaseStore):
         super(StateGroupWorkerStore, self).__init__(db_conn, hs)
 
         self._state_group_cache = DictionaryCache(
-            "*stateGroupCache*", 100000 * CACHE_SIZE_FACTOR
+            "*stateGroupCache*", 500000 * get_cache_factor_for("stateGroupCache")
         )
 
     @cached(max_entries=100000, iterable=True)