digest: Increase size of stream cache.

Since the cache is flushed when the cutoff or realm changes, the
maximum size of the cache should cap out at the number of streams in
the realm.  Raise the max cache size, now that this will not simply
lead to useless cache space for smaller servers.
This commit is contained in:
Alex Vandiver 2023-09-08 19:50:38 +00:00 committed by Tim Abbott
parent a8a1f10f3c
commit e0d3176098
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ def maybe_clear_recent_topics_cache(realm_id: int, cutoff: float) -> None:
# We cache both by stream-id and cutoff, which ensures the per-stream
# cache also does not contain data from old digests
@functools.lru_cache(maxsize=500)
@functools.lru_cache(maxsize=5000)
def get_recent_topics(
realm_id: int,
stream_id: int,