From a168e9e8cd9dd90f9e984935a2a4be5cef125128 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 1 Nov 2024 23:38:08 +0000 Subject: [PATCH] Report all refreshCheck() outcomes and entry gist (#1932) All other refreshCheck() return statements already have a debugs(). Reporting StoreEntry gist helps find the right calls in busy proxy logs. --- src/refresh.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/refresh.cc b/src/refresh.cc index 3e48cc0861e..81be28ae4b4 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -265,7 +265,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta) else if (request) uri = request->effectiveRequestUri(); - debugs(22, 3, "checking freshness of URI: " << uri); + debugs(22, 3, "checking freshness of " << *entry << " with URI: " << uri); // age is not necessarily the age now, but the age at the given check_time if (check_time > entry->timestamp) @@ -480,11 +480,14 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta) } #endif + debugs(22, 3, "returning STALE_EXPIRES"); return STALE_EXPIRES; } - if (sf.max) + if (sf.max) { + debugs(22, 3, "returning STALE_MAX_RULE"); return STALE_MAX_RULE; + } if (sf.lmfactor) { #if USE_HTTP_VIOLATIONS