From: Amos Jeffries Date: Mon, 28 Jan 2013 04:09:25 +0000 (-0700) Subject: Document HIT revalidation choices X-Git-Tag: SQUID_3_3_1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3462f1568f267c0a1aa98eeef9331e3f608e341;p=thirdparty%2Fsquid.git 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. --- 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.