From 058ec48142329352540ea45e9cd1d106ca73f268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Mon, 18 Sep 2023 20:14:38 +0200 Subject: [PATCH] improve comment --- posthog/caching/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/posthog/caching/utils.py b/posthog/caching/utils.py index 1ea94c889e72f..45ff4ba640968 100644 --- a/posthog/caching/utils.py +++ b/posthog/caching/utils.py @@ -88,10 +88,10 @@ def is_stale_filter( def is_stale(team: Team, date_to: datetime, interval: str, cached_result: Any) -> bool: - """Indicates wether a cache item is obviously outdated based on filters, - i.e. the next time interval was entered since the last computation. For - example an insight with -7d date range that was last computed yesterday. - The same insight refreshed today wouldn't be marked as stale. + """Indicates wether a cache item is obviously outdated based on the last + requested date (date_to) and the granularity of the query (interval). + It is considered outdated when the next time interval was entered since the + last computation. """ if stale_cache_invalidation_disabled(team):