diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-09 11:35:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 11:35:11 -0400 |
commit | 1781bbe319ce24e8e468f0422519dc5823d8d420 (patch) | |
tree | 07dd536a9cdec4d42b939391b1ff8984e2dff43c /synapse/federation | |
parent | Allow modules to create and send events into rooms (#8479) (diff) | |
download | synapse-1781bbe319ce24e8e468f0422519dc5823d8d420.tar.xz |
Add type hints to response cache. (#8507)
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_server.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index e8039e244c..23278e36b7 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -116,7 +116,7 @@ class FederationServer(FederationBase): # We cache results for transaction with the same ID self._transaction_resp_cache = ResponseCache( hs, "fed_txn_handler", timeout_ms=30000 - ) + ) # type: ResponseCache[Tuple[str, str]] self.transaction_actions = TransactionActions(self.store) @@ -124,10 +124,12 @@ class FederationServer(FederationBase): # We cache responses to state queries, as they take a while and often # come in waves. - self._state_resp_cache = ResponseCache(hs, "state_resp", timeout_ms=30000) + self._state_resp_cache = ResponseCache( + hs, "state_resp", timeout_ms=30000 + ) # type: ResponseCache[Tuple[str, str]] self._state_ids_resp_cache = ResponseCache( hs, "state_ids_resp", timeout_ms=30000 - ) + ) # type: ResponseCache[Tuple[str, str]] self._federation_metrics_domains = ( hs.get_config().federation.federation_metrics_domains |