Re: [squid-users] Custom max-age header

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 22 Oct 2009 00:52:53 +1300

Struzik Wojciech wrote:
> Actually I'm using varnish but varnish is unstable (slowdowns,
> coredumps). Varnish supports Cache-Control, so I can set up this on
> it.
> Here is a part of network my topology
>
> nginx (consistent hash) -> varnish
> ---> 1st backend
> | |
> |
> ---> 2nd backend
> |
> |
> -> varnish ---> 1st backend
> |
>
> ---> 2nd backend
>
>
> I want replace varnish into squid (better stability/performance when
> one of backends is down), so I wonder where is better to add
> Cache-Control: max-age header, on nginx or squid. Is it possible to
> set up custom Cache-Control (max-age) on squid ???

You have not yet answered the question of:
    WHY are you even thinking this ??

It's only possible to do it reliably and securely on the originating web
server. Squid does not make it easy to grossly violate the HTTP protocol.

There are three levels of Cache-Control values:
   s-max-age applying to middleware proxies
   max-age applying to web browsers (and middleware only if there is no
s-max-age present)

The Surrogate-Control header is also available on latest 3.1 via ESI to
control middleware in the delegated reverse-proxy chain separate to the
s-max-age values for external middleware.
It should not be to hard to make it work for HTTP reverse-proxy situations.

Amos

>
> On Wed, Oct 21, 2009 at 11:40 AM, Matus UHLAR - fantomas
> <uhlar_at_fantomas.sk> wrote:
>> On 21.10.09 10:48, Struzik Wojciech wrote:
>>> I using Squid 2.7. How can i add custom field max-age to Cache-Control
>>> response header ???
>> why would you want to do that on squid?
>> --
>> Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
>> Warning: I wish NOT to receive e-mail advertising to this address.
>> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
>> BSE = Mad Cow Desease ... BSA = Mad Software Producents Desease

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE19
   Current Beta Squid 3.1.0.14
Received on Wed Oct 21 2009 - 11:53:00 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 22 2009 - 12:00:03 MDT