Re: only caching images

From: Henrik Nordstrom <[email protected]>
Date: Fri, 16 Jul 1999 22:11:59 +0200

Jayme Cox wrote:
>
> We are running squid in accelerator mode and would like to proxy all
> documents, but only cache image files. Instead of adding lots of
> no_cache lines, I've changed the refresh_pattern lines:
>
> refresh_pattern -i *.gif 1440 20% 10080
> refresh_pattern -i *.jpg 1440 20% 10080
> refresh_pattern . 0 0% 0
>
> Is there a better way of doing this?

Yes. Add a single no_cache line.

acl images \.gif$ \.jpg$
no_cache allow images

The above use of refresh patterns won't deny caching of other content.
If the server has set an expiry time then the object will be cached
regardless of any refresh_pattern settings. Also most versions of Squid
will cache all cachable objects even if it immediately needs to be
refreshed. This is because in most configurations a refresh is
considered to be cheaper than a full fetch.

--
Henrik Nordstrom
Spare time Squid hacker
Received on Fri Jul 16 1999 - 13:59:43 MDT

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