Re: only caching images

From: Jayme Cox <jcox@dont-contact.us>
Date: Fri, 16 Jul 1999 17:10:45 -0700

To only cache images, this is what I've got working:

acl NOCACHE url_regex .*
acl IMAGES url_regex \.gif$ \.jpg$
no_cache deny NOCACHE
no_cache allow IMAGES

This will proxy everything, but only cache gif and jpg files.

Jayme Cox wrote:

> So would I also need a corresponding deny line like this:
>
> acl NOCACHE .*
> no_cache deny NOCACHE
>
> Henrik Nordstrom wrote:
>
> > 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
>
> --
> Jayme Cox
> Director of Network Operations
>
> Phone: 415-437-4709 x106
> Fax: 415-437-4710
> Zing Network, Inc.
> 550 Fifteenth Street
> San Francisco, CA 94103

--
Jayme Cox
Director of Network Operations
Phone: 415-437-4709 x106
Fax: 415-437-4710
Zing Network, Inc.
550 Fifteenth Street
San Francisco, CA 94103
Received on Fri Jul 16 1999 - 17:45:27 MDT

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