[squid-users] hier_code acl and cache allow/deny

From: Niki Gorchilov <niki_at_gorchilov.com>
Date: Fri, 14 Feb 2014 23:35:06 +0200

Hi all,

I keep exploring the darkest corners of the Squid universe thus
meeting unexpected creatures. :-)

Today's discovery is hier_code ACL.

I stumbled upon it while looking for a way to prevent SMP workers from
swapping duplicate objects they got from the shared memory cache.

On second thought, hier_code could also help me prevent swapping
objects fetched from cache peers, making my peername ACL redundant.

Oh, great! 2-in-1. Let's do it:

===[cut]===
# swap only objects fetched directly from source
# objects fetched from cache peers or
# shared memory shall not be cached
acl direct hier_code HIER_DIRECT
acl direct hier_code CLOSEST_DIRECT
acl direct hier_code SOURCE_FASTEST
acl direct hier_code PINNED
acl direct hier_code ORIGINAL_DST
cache allow direct
cache deny all
===[cut]===

Unfortunately, the above config prevented ANY objects from being
cached, like the hier_code wasn't available at the time the swap
decision is taken.

Am I doing it wrong? Is it possible to use hier_code acl against cache
deny/allow?

Best,
Niki

P.S. I'm using Squid 3.4.3 in case it matters...
Received on Fri Feb 14 2014 - 21:35:54 MST

This archive was generated by hypermail 2.2.0 : Sat Feb 15 2014 - 12:00:05 MST