[squid-users] Squid4 has extremely low hit ratio due to lacks of ignore-no-cache

Amos Jeffries squid3 at treenet.co.nz
Mon Oct 26 01:39:43 UTC 2015


On 26/10/2015 8:29 a.m., Yuri Voinov wrote:
> 
> In a nutshell - I need no possible explanation. I want to know - it's a
> bug or so conceived?

Well, I don't think it is what you think.

For starters ignore-no-cache was removed back in 3.2, so your 3.4
version working okay shows that its not that parameter.

Secondly, what ignore-no-cache did when it was supported was *prevent*
things marked with Cache-Control:no-cache by servers from caching. Quite
the opposite of what most proxy admin seemed to think.


What has been removed in 4.x is:
1) ignore-auth which again was preventing things being cached,

2) ignore-must-revalidate which was causing auth credentials, Cookies,
and per-user payload things to be delivered from cache to the wrong
users in some/many proxies.

As a result ignore-private is now relatively safe to use. Before it
utterly wiped out cache integrity when combined with the (2) behaviours.

Also ignore-expires is now safe to use. Since Squid should be acting
like a proper HTTP/1.1 cache with revalidations of stale content.


60% -ish sounds about right for the proportion of traffic using
Cache-Control: with any of must-revalidate, proxy-revalidate, no-cache,
private, or authentication.

If you are only looking at *_HIT you will see a massive decline. But
that is an illusion. In 4.x you need to count REFRESH_UNMODIFIED as a
HIT, and look at the cache ratio statistics for near-HITs as well as HITs.



Right after the upgrade from an older Squid it could be a case of your
cache having bad content in it. The revalidations would cause a burst of
replacements until that old content is updated. You would see that as a
sudden low point in the rate, increasing roughly exponentially back up
towards some new "normal" rate.

If you are having the huge decline even after revalidations are taken
into account and the new normal rate is reached, that is not expected.
You would need to analyse your traffic headers to find out what the
actual situation is.

Amos


More information about the squid-users mailing list