mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 15:02:24 -04:00
Add type hints to response cache. (#8507)
This commit is contained in:
parent
66ac4b1e34
commit
1781bbe319
9 changed files with 48 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue