Re: [squid-users] Vary / Accept-Encoding / mod_gzip Redux

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 8 May 2003 09:05:03 +0200

On Thursday 08 May 2003 01.54, R Pickett wrote:

> Oh, that's a very bad misunderstanding on my part then, and is a
> bit of a problem for our application. Is there any sane way to
> tell squid to purge a URL's full list of variations without knowing
> what they are ahead of time?

No. Squid-2.5 does not know. This information is only stored on disk,
and can only be found by lookup if there is a matching request.

See http://devel.squid-cache.org/vary/ for a description of the
algorithm and implementation Squid uses for storing Vary objects.

> Alternatively, is there a deterministic way to get a list of
> variants from squid for a URL? We cache rather aggresssively, and
> we want to be able to tell squid to drop its current copy,
> programmatically, when we update our backend database for a URL.

Not very easily in 2.5, but you should be able to use a modified
version of the purge tool I suppose. The request variance is stored
in the object meta header on disk in the STORE_META_VARY_HEADERS TLV
(8) using the syntax Header=Value, Header=Value, .... or just Header,
.. if the header was in mentioned in Vary but not part of the
request.

If the responses have a ETag and you use the ETag patch for 2.5 then
Squid keeps an index of what variants it has for a given URL and
their request variance. This however requires that you send different
ETag:s for different encodings and for best function that your server
also supports If-None-Match (last time this was discussed mod_gzip
supported neither.., making a mess of things by claiming the identity
and gzipped entity are the same entity).

For details on the ETag support patch see
http://devel.squid-cache.org/etag/. (not in the standard Squid-2.5
distribution).

The TLV meta header format is described in the programmers guide.

Regards
Henrik

-- 
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org
If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, info@marasystems.com
Received on Thu May 08 2003 - 01:04:37 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:16:22 MST