[squid-users] Refresh pattern issue in squid 3.1.20
Amos Jeffries
squid3 at treenet.co.nz
Thu Dec 31 10:31:44 UTC 2015
On 2015-12-31 22:35, Eliezer Croitoru wrote:
> On 31/12/2015 00:48, SaRaVanAn wrote:
>> Hi, All,
>> I tired suggested refresh pattern, still i was getting
>> TCP_HIT/MEM_HIT.
>> It's not getting refreshed after 10 minutes.
>>
>>
>> *Conf*
>> refresh_pattern -i ^http://[a-z\-\_\.A-Z0-9]+\.wsj\.(net|net|com|edu)/
>> 10
>> 200% 10 override-expire override-lastmod reload-into-ims ignore-reload
>
It is not being refreshed because it does not need to be.
Basically the refresh_pattern overrides can only *extend* caching, or
delay revalidation, not shorten it. If the origin says an object is
fresh for X amount of time it is expensive (by all metrics; bandwidth,
request latency, disk I/O delay, CPU cycles) to discard it earlier than
that.
override-expires forces the 'min' value to apply. It is a *minimum*
freshness time. If the Expires header or CC:max-age are present and
already saying a value larger, then it has no effect.
- this is what you are seeing SaRaVanAn.
If there were no Expires or CC:max-age, then the max limit would be
applied and with a value of "10" it does what you want to happen.
- notice how none of the override-* are relevant to doing what you
want, and the Expires/CC:max-age override is just preventing some
dynamic content from updating as fast as the origin claims it will be
changing.
override-lastmod forces the 'min' limit to be used if the Last-Modified
header (lmfactor) algorithm calculates a short caching time.
- it also can only extend freshness time *up* to the min-value, not
reduce it. If the algorithm produces a longer caching time that will be
used.
> I am not sure but you are maybe hitting bug 4389 which I have just
> recently filed:
> http://bugs.squid-cache.org/show_bug.cgi?id=4389
>
The CC:no-cache control is not present in the responses redbot shows me.
So not that one.
Amos
More information about the squid-users
mailing list