From a3462f1568f267c0a1aa98eeef9331e3f608e341 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 27 Jan 2013 21:09:25 -0700 Subject: [PATCH] Document HIT revalidation choices This adds cache.log entries at level 88,3 detailing the decisions why to convert a HIT into a MISS or REFRESH response. Resolving a users FAQ. --- src/client_side_reply.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index b1c8d1b035..4b533f59c2 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -561,6 +561,7 @@ clientReplyContext::cacheHit(StoreIOBuffer result) r->flags.needValidation = 1; if (e->lastmod < 0) { + debugs(88, 3, "validate HIT object? NO. Missing Last-Modified header. Do MISS."); /* * Previous reply didn't have a Last-Modified header, * we cannot revalidate it. @@ -568,6 +569,7 @@ clientReplyContext::cacheHit(StoreIOBuffer result) http->logType = LOG_TCP_MISS; processMiss(); } else if (r->flags.noCache) { + debugs(88, 3, "validate HIT object? NO. Client sent CC:no-cache. Do CLIENT_REFRESH_MISS"); /* * This did not match a refresh pattern that overrides no-cache * we should honour the client no-cache header. @@ -575,12 +577,14 @@ clientReplyContext::cacheHit(StoreIOBuffer result) http->logType = LOG_TCP_CLIENT_REFRESH_MISS; processMiss(); } else if (r->protocol == AnyP::PROTO_HTTP) { + debugs(88, 3, "validate HIT object? YES."); /* * Object needs to be revalidated * XXX This could apply to FTP as well, if Last-Modified is known. */ processExpired(); } else { + debugs(88, 3, "validate HIT object? NO. Client protocol non-HTTP. Do MISS."); /* * We don't know how to re-validate other protocols. Handle * them as if the object has expired. -- 2.47.2