diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-10-14 19:43:37 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-10-14 23:38:14 +0100 |
commit | 9f87da0a84f93096e228f01f1139c9b5db8ea3d4 (patch) | |
tree | 7e7537fc724023611f94727b9b93791862aaf3b7 /synapse/replication/slave/storage | |
parent | Add some more type annotations to Cache (diff) | |
download | synapse-9f87da0a84f93096e228f01f1139c9b5db8ea3d4.tar.xz |
Rename Cache->DeferredCache
Diffstat (limited to 'synapse/replication/slave/storage')
-rw-r--r-- | synapse/replication/slave/storage/client_ips.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/replication/slave/storage/client_ips.py b/synapse/replication/slave/storage/client_ips.py index 273d627fad..40ea78a353 100644 --- a/synapse/replication/slave/storage/client_ips.py +++ b/synapse/replication/slave/storage/client_ips.py @@ -15,7 +15,7 @@ from synapse.storage.database import DatabasePool from synapse.storage.databases.main.client_ips import LAST_SEEN_GRANULARITY -from synapse.util.caches.descriptors import Cache +from synapse.util.caches.descriptors import DeferredCache from ._base import BaseSlavedStore @@ -24,9 +24,9 @@ class SlavedClientIpStore(BaseSlavedStore): def __init__(self, database: DatabasePool, db_conn, hs): super().__init__(database, db_conn, hs) - self.client_ip_last_seen = Cache( + self.client_ip_last_seen = DeferredCache( name="client_ip_last_seen", keylen=4, max_entries=50000 - ) # type: Cache[tuple, int] + ) # type: DeferredCache[tuple, int] async def insert_client_ip(self, user_id, access_token, ip, user_agent, device_id): now = int(self._clock.time_msec()) |