summary refs log tree commit diff
path: root/synapse/state/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-20 14:49:43 +0100
committerErik Johnston <erik@matrix.org>2018-08-20 14:49:43 +0100
commit4d664278afc044e0d6118de4e22bccbf5464402c (patch)
tree58a6364007ecfbdb6f51f997bbd86f4e538dd8ef /synapse/state/__init__.py
parentRemove redundant room_version checks (diff)
parentMerge pull request #3719 from matrix-org/erikj/use_cache_fact (diff)
downloadsynapse-4d664278afc044e0d6118de4e22bccbf5464402c.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_state_handler
Diffstat (limited to 'synapse/state/__init__.py')
-rw-r--r--synapse/state/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/state/__init__.py b/synapse/state/__init__.py
index a2992fd953..b34970e4d1 100644
--- a/synapse/state/__init__.py
+++ b/synapse/state/__init__.py
@@ -26,8 +26,8 @@ from twisted.internet import defer
 from synapse.api.constants import EventTypes, RoomVersions
 from synapse.events.snapshot import EventContext
 from synapse.state import v1
-from synapse.util.async import Linearizer
-from synapse.util.caches import CACHE_SIZE_FACTOR
+from synapse.util.async_helpers import Linearizer
+from synapse.util.caches import get_cache_factor_for
 from synapse.util.caches.expiringcache import ExpiringCache
 from synapse.util.logutils import log_function
 from synapse.util.metrics import Measure
@@ -38,7 +38,7 @@ logger = logging.getLogger(__name__)
 KeyStateTuple = namedtuple("KeyStateTuple", ("context", "type", "state_key"))
 
 
-SIZE_OF_CACHE = int(100000 * CACHE_SIZE_FACTOR)
+SIZE_OF_CACHE = 100000 * get_cache_factor_for("state_cache")
 EVICTION_TIMEOUT_SECONDS = 60 * 60