From e0d3176098f8cb13c40fccef5bd6daec75c1d774 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 8 Sep 2023 19:50:38 +0000 Subject: [PATCH] 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. --- zerver/lib/digest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/digest.py b/zerver/lib/digest.py index fcb27a25d1..348c3c6977 100644 --- a/zerver/lib/digest.py +++ b/zerver/lib/digest.py @@ -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,