]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Report all refreshCheck() outcomes and entry gist (#1932)
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 1 Nov 2024 23:38:08 +0000 (23:38 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 3 Nov 2024 07:06:29 +0000 (07:06 +0000)
All other refreshCheck() return statements already have a debugs().
Reporting StoreEntry gist helps find the right calls in busy proxy logs.

src/refresh.cc

index 3e48cc0861e6eaed6d47889e7da18a22f42d51c8..81be28ae4b49df3f4dfc40dbde17033f65dd0202 100644 (file)
@@ -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