[squid-users] How to cache everything with an Etag HTTP header?

Amos Jeffries squid3 at treenet.co.nz
Wed Feb 18 14:32:06 UTC 2015


On 19/02/2015 2:22 a.m., Karl-Philipp Richter wrote:
> Hi,
> I'm quite new to advanced squid configuration and want to enhance my
> HTTP cache expensive-bandwidth-cheap-storage setup where I'm mostly
> interested in storing large downloads with a refresh_pattern, e.g.
> 
>     refresh_pattern -i
> \.(deb|rpm|exe|zip|tar|tgz|tar\.gz|txz|tar\.xz|ram|rar|bin|ppt|doc|tiff)$ 100800
> 99% 432000 override-expire override-lastmod
> ignore-no-cache ignore-no-store
> 
> and after some reading around `refresh_pattern` and some search engine
> research I was wondering how to cache everything that provides an Etag
> because I thinks that'd be very useful for my scenario (very low starge
> cost and very high bandwidth costs).
> 
> Any help or pointers are appreciated.

Pointer #1 - ETag does mean cacheable. It is just a unique ID for the
object.

In an ideal HTTP world everything has an ETag to identify it, cacheable
or not.

And BTW just by using Squid everything gets stored. Whether its still
usable next time the same URL is requested is another matter entirely.
This is why Squid disk behaviour is mostly-write (2-5 objects written to
disk for every 1 read back out).


Pointer #2 - if your squid accepts the "ignore-no-cache" option then its
too old.

Upgrade to a squid-3.2+ which do HTTP/1.1 caching of
no-cache/private/auth objects then work on it in the context of the
newer versions extra capabilities.


Amos



More information about the squid-users mailing list