mirror of
https://github.com/zulip/zulip.git
synced 2025-10-31 20:13:46 +00:00
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:
committed by
Tim Abbott
parent
a8a1f10f3c
commit
e0d3176098
@@ -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
|
# We cache both by stream-id and cutoff, which ensures the per-stream
|
||||||
# cache also does not contain data from old digests
|
# cache also does not contain data from old digests
|
||||||
@functools.lru_cache(maxsize=500)
|
@functools.lru_cache(maxsize=5000)
|
||||||
def get_recent_topics(
|
def get_recent_topics(
|
||||||
realm_id: int,
|
realm_id: int,
|
||||||
stream_id: int,
|
stream_id: int,
|
||||||
|
|||||||
Reference in New Issue
Block a user