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

From: Struzik Wojciech <bm9ib2r5_at_gmail.com>
Date: Thu, 22 Oct 2009 11:24:50 +0200

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

Because one of my backend is Amazon S3 and I can't set up
Cache-Control on it. So I looking for different solution how to change
this header field (squid). I want the objects to be cache as long as
possible on the clients web-browser side (1 year).

On Wed, Oct 21, 2009 at 1:52 PM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
> 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
>

-- 
Regards
Struzik Wojciech
mobile: +48504678810
xmpp: nob_at_hct.pl
Received on Thu Oct 22 2009 - 09:25:00 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 27 2009 - 12:00:03 MDT