Re: [squid-users] inconsistency with objects in squid cache

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 08 Apr 2014 15:22:44 +1200

On 8/04/2014 12:54 p.m., Sylvio Cesar wrote:
> Amos,
>
> I have configured squid.conf
>
> request_header_access Vary deny all
>
> put the squid ignores this and still appears the Vary: Accept-Encoding
> Is there a way to delete the row of squid Vary: Accept-Encoding?

No. That will screw up HTTP.

From the IETF draft which is about to become the new HTTP/1.1 RFC
standard
(<http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-7.1.4>)

" An origin server might send Vary with a list of fields for two
   purposes:

   1. To inform cache recipients that they MUST NOT use this response
       to satisfy a later request unless the later request has the same
       values for the listed fields as the original request (Section 4.1
       of [Part6]). In other words, Vary expands the cache key required
       to match a new request to the stored cache entry.
"

No matter what is done when communicating with the server it is the
*received* header from clients which Squid is required to use for cache
lookups.
 ==> Mangling the headers delivered to the server (and thus the ones
used to store the object) will only increase the amount of MISS
happening on Vary. As later client requests with even the same headers
as current client request will not match the headers sent to the server.

The best you can do is ensure that the server sees the headers Squid
received from the client as accurately as possible (for at least the set
mentioned in Vary). Future requests from the same client or others with
the same UA and encoding can then HIT.

Remember: there is *never* a guarantee of a HIT in real traffic. Caching
is a "best effort" mechanism.

Amos
Received on Tue Apr 08 2014 - 03:22:50 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 08 2014 - 12:00:05 MDT