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/storage/databases/main/devices.py | |
parent | Add some more type annotations to Cache (diff) | |
download | synapse-9f87da0a84f93096e228f01f1139c9b5db8ea3d4.tar.xz |
Rename Cache->DeferredCache
Diffstat (limited to 'synapse/storage/databases/main/devices.py')
-rw-r--r-- | synapse/storage/databases/main/devices.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py index 88fd97e1df..d903155e89 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py @@ -34,7 +34,7 @@ from synapse.storage.database import ( ) from synapse.types import Collection, JsonDict, get_verify_key_from_cross_signing_key from synapse.util import json_decoder, json_encoder -from synapse.util.caches.descriptors import Cache, cached, cachedList +from synapse.util.caches.descriptors import DeferredCache, cached, cachedList from synapse.util.iterutils import batch_iter from synapse.util.stringutils import shortstr @@ -1004,7 +1004,7 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore): # Map of (user_id, device_id) -> bool. If there is an entry that implies # the device exists. - self.device_id_exists_cache = Cache( + self.device_id_exists_cache = DeferredCache( name="device_id_exists", keylen=2, max_entries=10000 ) |