mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:34:47 -04:00
Allow configuration of Synapse's cache without using synctl or environment variables (#6391)
This commit is contained in:
parent
a8580c5f19
commit
7cb8b4bc67
32 changed files with 620 additions and 146 deletions
|
@ -22,7 +22,7 @@ from six import string_types
|
|||
|
||||
from synapse.events import EventBase
|
||||
from synapse.types import UserID
|
||||
from synapse.util.caches import CACHE_SIZE_FACTOR, register_cache
|
||||
from synapse.util.caches import register_cache
|
||||
from synapse.util.caches.lrucache import LruCache
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -165,7 +165,7 @@ class PushRuleEvaluatorForEvent(object):
|
|||
|
||||
|
||||
# Caches (string, is_glob, word_boundary) -> regex for push. See _glob_matches
|
||||
regex_cache = LruCache(50000 * CACHE_SIZE_FACTOR)
|
||||
regex_cache = LruCache(50000)
|
||||
register_cache("cache", "regex_push_cache", regex_cache)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue