summary refs log tree commit diff
path: root/synapse/util/caches/deferred_cache.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-09-16 11:13:00 +0100
committerErik Johnston <erik@matrix.org>2021-09-16 11:13:00 +0100
commit2cc4c33d0a422eddf81ceaf2891b461c7a6ce152 (patch)
tree906afac66b1597bc50f8c9e5ed69c353219c746c /synapse/util/caches/deferred_cache.py
parentMerge remote-tracking branch 'origin/release-v1.43' into matrix-org-hotfixes (diff)
parentChangelog (diff)
downloadsynapse-2cc4c33d0a422eddf81ceaf2891b461c7a6ce152.tar.xz
Merge remote-tracking branch 'origin/dmr/cache-eviction-hack' into matrix-org-hotfixes
Diffstat (limited to 'synapse/util/caches/deferred_cache.py')
-rw-r--r--synapse/util/caches/deferred_cache.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/util/caches/deferred_cache.py b/synapse/util/caches/deferred_cache.py

index f05590da0d..6262efe072 100644 --- a/synapse/util/caches/deferred_cache.py +++ b/synapse/util/caches/deferred_cache.py
@@ -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