mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 22:44:49 -04:00
Remove keylen
from LruCache
. (#9993)
`keylen` seems to be a thing that is frequently incorrectly set, and we don't really need it. The only time it was used was to figure out if we had removed a subtree in `del_multi`, which we can do better by changing `TreeCache.pop` to return a different type (`TreeCacheNode`). Commits should be independently reviewable.
This commit is contained in:
parent
316f89e87f
commit
c0df6bae06
11 changed files with 80 additions and 55 deletions
|
@ -1053,7 +1053,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 = LruCache(
|
||||
cache_name="device_id_exists", keylen=2, max_size=10000
|
||||
cache_name="device_id_exists", max_size=10000
|
||||
)
|
||||
|
||||
async def store_device(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue