From 94cc3228c8caf66231fbce3347baba9265a8a528 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 10 Jun 2026 13:03:07 +0530 Subject: [PATCH] perf: extend cache key expiry to 7 days --- app/models/concerns/cache_keys.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/concerns/cache_keys.rb b/app/models/concerns/cache_keys.rb index dc451526b..ff02071df 100644 --- a/app/models/concerns/cache_keys.rb +++ b/app/models/concerns/cache_keys.rb @@ -4,7 +4,11 @@ module CacheKeys include CacheKeysHelper include Events::Types - CACHE_KEYS_EXPIRY = 72.hours + # Self-healing bound: if a write path ever changes cached data without + # bumping its key, expiry forces the sentinel and every client refetches. + # 7 days caps that staleness while sparing quiet models (labels, teams) + # from a spurious full refetch after every idle weekend. + CACHE_KEYS_EXPIRY = 7.days included do class_attribute :cacheable_models