[squid-users] Tips to reduce cache

Amos Jeffries squid3 at treenet.co.nz
Tue Jun 16 18:26:12 UTC 2015


On 17/06/2015 1:11 a.m., David Touzeau wrote:
> 
> Hi all,
> 
> I need to force squid to cache some websites only for one hour ( no more)
> did this refresh_pattern directive is able to answerto this need ?
> 
> What is the best refresh_pattern value  to force a website to be cached
> only for one hour ?

For that to happen one of three things need to happen:
* The client needs to send Cache-Control:max-age=3600 to Squid in its
request.
* The server sends Cache-Control:max-age=3600, or
Cache-Control:s-maxage=3600 or Expires: 1hr in the future in its reply.
* The server sends Date and Last-Modified BUT NOT Expires or
Cache-Control:, AND you have a refresh_pattern with value "60" in the
max-age field for the relevant URLs.

Why the bother?

Amos



More information about the squid-users mailing list