diff options
author | Erik Johnston <erik@matrix.org> | 2019-08-13 10:06:51 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-08-13 10:06:51 +0100 |
commit | f218705d2a9ce60b0b996ab29b7c85efb9236109 (patch) | |
tree | 886ce152400b0c9a30f75dd30d7f5eb2f6f72043 /synapse | |
parent | Newsfile (diff) | |
download | synapse-f218705d2a9ce60b0b996ab29b7c85efb9236109.tar.xz |
Make default well known cache global again.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/http/federation/well_known_resolver.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/http/federation/well_known_resolver.py b/synapse/http/federation/well_known_resolver.py index bab4ab015e..d2866ff67d 100644 --- a/synapse/http/federation/well_known_resolver.py +++ b/synapse/http/federation/well_known_resolver.py @@ -47,6 +47,9 @@ WELL_KNOWN_MIN_CACHE_PERIOD = 5 * 60 logger = logging.getLogger(__name__) +_well_known_cache = TTLCache("well-known") + + @attr.s(slots=True, frozen=True) class WellKnownLookupResult(object): delegated_server = attr.ib() @@ -61,7 +64,7 @@ class WellKnownResolver(object): self._clock = Clock(reactor) if well_known_cache is None: - well_known_cache = TTLCache("well-known") + well_known_cache = _well_known_cache self._well_known_cache = well_known_cache self._well_known_agent = RedirectAgent(agent) |