diff options
author | Erik Johnston <erik@matrix.org> | 2017-07-04 09:56:44 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-07-04 09:56:44 +0100 |
commit | b5e8d529e610352e0eb3887fac67a8ca5897bec1 (patch) | |
tree | 370d5d247ea3edcce7bf99aa7affe9ff1038ef87 /synapse/state.py | |
parent | Merge pull request #2321 from matrix-org/erikj/prefill_forward (diff) | |
download | synapse-b5e8d529e610352e0eb3887fac67a8ca5897bec1.tar.xz |
Define CACHE_SIZE_FACTOR once
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/state.py b/synapse/state.py index 5b386e3183..390799fbd5 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -24,13 +24,13 @@ from synapse.api.constants import EventTypes from synapse.api.errors import AuthError from synapse.events.snapshot import EventContext from synapse.util.async import Linearizer +from synapse.util.caches import CACHE_SIZE_FACTOR from collections import namedtuple from frozendict import frozendict import logging import hashlib -import os logger = logging.getLogger(__name__) @@ -38,9 +38,6 @@ logger = logging.getLogger(__name__) KeyStateTuple = namedtuple("KeyStateTuple", ("context", "type", "state_key")) -CACHE_SIZE_FACTOR = float(os.environ.get("SYNAPSE_CACHE_FACTOR", 0.1)) - - SIZE_OF_CACHE = int(100000 * CACHE_SIZE_FACTOR) EVICTION_TIMEOUT_SECONDS = 60 * 60 |