Re: [squid-users] Re: refresh patterns!

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Wed, 15 Aug 2007 07:18:19 +0200

On tis, 2007-08-14 at 21:57 +0100, RW wrote:

> I'm talking about overriding the default for query urls.

Ah, those suggested defaults..

> I was wondering how safe, and how useful something like this would be:
>
> acl cache_upr urlpath_regex -i \.(png|jpe?g|gif|tif+|ico|css|js|swf|swv)($|&)
> cache allow cache_upr
> acl QUERY urlpath_regex cgi-bin \?
> cache deny QUERY

Provided you always usa a min-age of 0 in refresh_pattern the cache
block of cgi-bin and query URLs is not needed at all.

The rules exists because of this:

RFC 2616 13.9 Side Effects of GET and HEAD

   We note one exception to this rule: since some applications have
   traditionally used GETs and HEADs with query URLs (those containing a
   "?" in the rel_path part) to perform operations with significant side
   effects, caches MUST NOT treat responses to such URIs as fresh unless
   the server provides an explicit expiration time. This specifically
   means that responses from HTTP/1.0 servers for such URIs SHOULD NOT
   be taken from a cache. See section 9.1.1 for related information.

Regards
Henrik

Received on Tue Aug 14 2007 - 23:18:33 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Sep 01 2007 - 12:00:03 MDT