Re: [squid-users] Cache-control modification and accelarator mode

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 18 Dec 2003 08:20:27 +0100 (CET)

On Thu, 18 Dec 2003, Gabriel Wicke wrote:

> On the xhtml content i set the Cache-control header as
> must-revalidate,max-age=0,s-maxage=36000.
> The browser will always check back for changes, squid will get a purge
> request if something changes.
>
> This breaks as soon as some transparent proxy gets in the way that picks
> up the s-maxage header.

Does not need to be a transparent proxy, just any proxy supporting
s-maxage will do this.

The above headers says

  * Shared caches (i.e. proxies) may cache the object for 36000 seconds
  * All other caches (i.e. browsers) must check with their source (i.e.
the proxy in proxied environment) if the source knows about a newer copy.

> So i'd like to strip any s-maxage headers or set them to 0 when passing
> through squid. I took a look at header_access and header_replace:
>
> header_access Cache-control deny all
> header_replace Cache-control Must-revalidate,max-age=0,s-maxage=0
>
> This makes the browser check back for everything on every request
> (stylesheets, pics...), very slow.
>
> What i'd like to achieve is a conditional replace only if s-maxage was
> included in the original header. Is this possible with some acl matching
> magic?

If you know which URLs you need to do this on then just make
a urlpath_regex pattern matching which URLs this need to be done on (or
not done on) and then use this in header_access when determining if the
header should be replaced.

Regards
Henrik
Received on Thu Dec 18 2003 - 00:20:31 MST

This archive was generated by hypermail pre-2.1.9 : Thu Jan 01 2004 - 12:00:16 MST