summary refs log tree commit diff
path: root/synapse/util/caches/deferred_cache.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-02-02 15:11:23 +0000
committerGitHub <noreply@github.com>2022-02-02 15:11:23 +0000
commitf510fba4ba9d0ebf0c062f0a561da19b2ea0c2d6 (patch)
tree755e958372e57767cd8acb984884d09039cfa94c /synapse/util/caches/deferred_cache.py
parentRevert experimental push rules from #7997. (#11884) (diff)
downloadsynapse-f510fba4ba9d0ebf0c062f0a561da19b2ea0c2d6.tar.xz
Describe `prune_unread_entries` in docstrings (#11876)
Should have been caught in #10826.
Diffstat (limited to 'synapse/util/caches/deferred_cache.py')
-rw-r--r--synapse/util/caches/deferred_cache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/util/caches/deferred_cache.py b/synapse/util/caches/deferred_cache.py
index 377c9a282a..1d6ec22191 100644
--- a/synapse/util/caches/deferred_cache.py
+++ b/synapse/util/caches/deferred_cache.py
@@ -81,13 +81,14 @@ class DeferredCache(Generic[KT, VT]):
         Args:
             name: The name of the cache
             max_entries: Maximum amount of entries that the cache will hold
-            keylen: The length of the tuple used as the cache key. Ignored unless
-               `tree` is True.
             tree: Use a TreeCache instead of a dict as the underlying cache type
             iterable: If True, count each item in the cached object as an entry,
                 rather than each cached object
             apply_cache_factor_from_config: Whether cache factors specified in the
                 config file affect `max_entries`
+            prune_unread_entries: If True, cache entries that haven't been read recently
+                will be evicted from the cache in the background. Set to False to
+                opt-out of this behaviour.
         """
         cache_type = TreeCache if tree else dict