mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 01:14:48 -04:00
Opt out of cache expiry for get_users_who_share_room_with_user
(#10826)
* Allow LruCaches to opt out of time-based expiry * Don't expire `get_users_who_share_room` & friends
This commit is contained in:
parent
80828eda06
commit
724aef9a87
5 changed files with 30 additions and 6 deletions
|
@ -73,6 +73,7 @@ class DeferredCache(Generic[KT, VT]):
|
|||
tree: bool = False,
|
||||
iterable: bool = False,
|
||||
apply_cache_factor_from_config: bool = True,
|
||||
prune_unread_entries: bool = True,
|
||||
):
|
||||
"""
|
||||
Args:
|
||||
|
@ -105,6 +106,7 @@ class DeferredCache(Generic[KT, VT]):
|
|||
size_callback=(lambda d: len(d) or 1) if iterable else None,
|
||||
metrics_collection_callback=metrics_cb,
|
||||
apply_cache_factor_from_config=apply_cache_factor_from_config,
|
||||
prune_unread_entries=prune_unread_entries,
|
||||
)
|
||||
|
||||
self.thread: Optional[threading.Thread] = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue