mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 12:12:44 +00:00
Use get_cache_factor_for function for state_cache
This allows the cache factor for `state_cache` to be individually specified in the enviroment
This commit is contained in:
parent
2aa7cc6a46
commit
f2a48d87df
@ -29,7 +29,7 @@ from synapse.api.constants import EventTypes
|
||||
from synapse.api.errors import AuthError
|
||||
from synapse.events.snapshot import EventContext
|
||||
from synapse.util.async_helpers import Linearizer
|
||||
from synapse.util.caches import CACHE_SIZE_FACTOR
|
||||
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
|
||||
@ -40,7 +40,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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user