Describe prune_unread_entries in docstrings (#11876)

Should have been caught in #10826.
This commit is contained in:
David Robertson 2022-02-02 15:11:23 +00:00 committed by GitHub
parent acda9f07c8
commit f510fba4ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View file

@ -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