On 05/20/2013 08:23 AM, Amos Jeffries wrote:
> These two headers are marked as experimental, but have been in there so
> long they seem to have become defacto standards for HIT/MISS debugging.
>
> 1) they are not necessary on 99% (or more) of traffic.
Agreed.
> 2) they *actualy* present bogus information, and most of the blog /
> tutorial / how-to I have found document some strange behaviour which is
> *not* how Squid has aways used them.
I know they present correct information in some cases. I personally have
never seen them lie IIRC, but it may depend on when and how they are
interpreted.
> 3) X-Cache-Lookup, when it works at all it is redundant behind X-Cache.
This is incorrect. X-Cache-Lookup may say HIT when X-Cache says MISS,
indicating that the object was cached, but the cached copy could not be
used. Very useful during triage!
> When it does not work presents "MISS", always.
>
>
> X-Cache-Lookup I think we can just drop.
>
> X-Cache is trickier due to the defacto nature it has gained. I think we
> can suppress its addition unless TRACE method or Max-Forwards header are
> present as a sign of manual debugging. Alternatively we could make it
> configurable. Either way the minor information leak and bandwidth waste
> that it presents can be resolved.
Both TRACE and Max-Forwards are bad triggers because the first one
defeats the purpose (debugging of Squid caching behavior) and the other
one is awkward to add to requests the admin may not control.
I think it is best to emit them if (and only if) squid.conf tells Squid
to do that. I can suggest the following configuration alternatives:
1) A new dedicated directive ("x_cache_headers on/off"?).
2) A new debug_options option ("x_cache_headers=on/off"?).
3) reply_header_add and %Ss, %SsLookup logformat codes.
The last option requires adding support for reply_header_add and
%SsLookup logformat code, but that should be fairly easy, and
reply_header_add will be added sooner or later anyway.
> PS. if X-Cache remains I think we should extend it slightly to indicate
> REFRESH operations not just HIT/MISS.
%Ss in reply_header_add would take care of that.
Cheers,
Alex.
Received on Mon May 20 2013 - 20:18:56 MDT
This archive was generated by hypermail 2.2.0 : Tue May 21 2013 - 12:00:17 MDT