diff --git a/archive_query_log/monitoring/home.py b/archive_query_log/monitoring/home.py index 80ad573..5b7ee94 100644 --- a/archive_query_log/monitoring/home.py +++ b/archive_query_log/monitoring/home.py @@ -11,6 +11,9 @@ UrlOffsetParser, WarcQueryParser, WarcSnippetsParser from archive_query_log.utils.time import utc_now +_CACHE_SECONDS_STATISTICS = 60 * 5 # 5 minutes +_CACHE_SECONDS_PROGRESS = 60 * 10 # 10 minutes + class Statistics(NamedTuple): name: str @@ -35,7 +38,7 @@ class Progress(NamedTuple): Statistics, ] = ExpiringDict( max_len=100, - max_age_seconds=15, + max_age_seconds=_CACHE_SECONDS_STATISTICS, ) @@ -97,7 +100,7 @@ def _get_statistics( Progress, ] = ExpiringDict( max_len=100, - max_age_seconds=15, + max_age_seconds=_CACHE_SECONDS_PROGRESS, )