Merge branch 'hawkowl/cache-config-without-synctl' of github.com:matrix-org/synapse into hawkowl/cache-config-without-synctl

* 'hawkowl/cache-config-without-synctl' of github.com:matrix-org/synapse:
  Update synapse/config/cache.py
pull/6391/head
Andrew Morgan 2020-04-03 18:01:33 +01:00
commit 14fbf27709
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ class CacheConfig(Config):
@staticmethod
def _reset():
"""Resets the caches to their defaults.
Used for tests.
"""
CACHE_PROPERTIES["default_size_factor"] = float(os.environ.get(_CACHE_PREFIX, 0.5))
CACHE_PROPERTIES["ensure_correct_cache_sizing"] = None
_CACHES.clear()