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
|
@ -16,6 +16,7 @@ import logging
|
|||
|
||||
from synapse.util.async import ObservableDeferred
|
||||
from synapse.util import unwrapFirstError, logcontext
|
||||
from synapse.util.caches import CACHE_SIZE_FACTOR
|
||||
from synapse.util.caches.lrucache import LruCache
|
||||
from synapse.util.caches.treecache import TreeCache, iterate_tree_cache_entry
|
||||
from synapse.util.stringutils import to_ascii
|
||||
|
@ -25,7 +26,6 @@ from . import register_cache
|
|||
from twisted.internet import defer
|
||||
from collections import namedtuple
|
||||
|
||||
import os
|
||||
import functools
|
||||
import inspect
|
||||
import threading
|
||||
|
@ -37,9 +37,6 @@ logger = logging.getLogger(__name__)
|
|||
_CacheSentinel = object()
|
||||
|
||||
|
||||
CACHE_SIZE_FACTOR = float(os.environ.get("SYNAPSE_CACHE_FACTOR", 0.1))
|
||||
|
||||
|
||||
class CacheEntry(object):
|
||||
__slots__ = [
|
||||
"deferred", "sequence", "callbacks", "invalidated"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue