mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Define CACHE_SIZE_FACTOR once
This commit is contained in:
parent
47574c9cba
commit
b5e8d529e6
5 changed files with 6 additions and 21 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue