Re: [MERGE] Squid Patch (revision 10487)

From: Michael Pye <michael_at_ulimit.org>
Date: Tue, 13 May 2014 17:42:40 +0100

On 2014-05-13 11:53, Amos Jeffries wrote:
> On 13/05/2014 10:52 p.m., Amos Jeffries wrote:
>> On 13/05/2014 4:56 a.m., Michael Pye wrote:
>>> On 2014-05-12 16:52, Amos Jeffries wrote:
>>>> Here is the guts of the original patch as should be relevant to
>>>> Squid-3.5 (or 3.4).
>>>> http://master.squid-cache.org/~amosjeffries/patches/Pye_s35.patch
>>>
>>> Many thanks Amos, I've just tried this and it does indeed query
>>> sibling
>>> for stale content as we want.
>>>
>>> I think there is some logic that will need updating however in
>>> HttpHeader.cc possibly, as when an object becomes stale and the
>>> sibling
>>> does not have a fresh copy, the origin is queried but the "Age:"
>>> and
>>> "X-Cache:HIT from" headers are still on the new request, even
>>> though it
>>> was a fresh check from the origin. I think these headers need to be
>>> deleted/updated.
>>
>> Is this a fully new set of headers+object from the server?
>> or a revalidation update/refresh from the server?
>>
>> On the former Age and X-Cache are correct because it is "just" a
>> fresher
>> update of the initial cache HIT object.
>
> Oops I meant s/former/latter/.

Sorry - reread what you said. So if its a revalidation and the content
hasn't changed (304 from origin), under normal squid *without* this
patch, Age will return to 0 and count up to the max-age again before
doing another revalidation. A max-age 60 second object will remain in
cache for 60 seconds before revalidation.

With the patch applied, if squidA gets a copy of the content from
siblingB where Age already has X seconds set, when that object is next
revalidated against the origin (now siblingB copy has expired), its Age
remains at X seconds, counting up to max-age. The max-age 60 object is
now revalidating against the origin every 30 seconds, I would have
expected it to return to validating every 60 seconds.

Thanks
Michael
Received on Tue May 13 2014 - 16:42:51 MDT

This archive was generated by hypermail 2.2.0 : Wed May 14 2014 - 12:00:13 MDT