[squid-users] Yet another store_id question HIT MISS

Amos Jeffries squid3 at treenet.co.nz
Wed Aug 17 14:28:58 UTC 2016


On 18/08/2016 1:43 a.m., Omid Kosari wrote:
> Why following link is HIT
> 
> X-Cache:"HIT from cache1"
> X-Cache-Lookup:"HIT from cache1:3128"
> 
> 
> http://igcdn-photos-c-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg
> 
> but this one is MISS
> 
> http://igcdn-photos-a-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg
> 

Because your override-expire tells Squid to ignore the
Cache-Control:max-age expiry details - instead to treat anything 10080
seconds old as expired.

Then the override-last-mod tells Squid to ignore the Last-Modified
header, instead to treat everything arriving as being 10080 seconds old.

When combined they mean that objects are only cacheable for the
remainder of the first second after arrival. When that 0-1 second is
over they are identified as being stale and require revalidation to be used.

Your options also tell Squid to ignore revalidation ...
 You see where this is going?


It is most often a bad idea to override cache controls coming from the
server. refresh_pattern is a way to work around broken services or those
which do not send sufficient cache-controls to cache properly. Use with
great care and caution.

Amos



More information about the squid-users mailing list