[squid-users] How to use "cache", "store_miss" and "send_hit" directives?

Robert rs-squid at lists.microscopium.de
Wed Oct 16 14:38:47 UTC 2019


Hi there,

after upgrading to 4.6 from 3.x, I am completely confused about how to
use the cache, store_miss and send_hit directives correctly.

I am using ACLs for different handling of clients connecting to
different local ports:

  acl proxy-basic localip 172.16.2.243
  acl proxy-standard localip 172.16.3.243

These ACLs are used to determine outgoing address, which are routed to
different outgoing interfaces like this:

  tcp_outgoing_address 172.16.3.244 proxy-basic
  tcp_outgoing_address 172.16.4.244 proxy-standard

This works as desired.

Now I am struggling with caching objects. The goal is, to have objects
requested by proxy-basic clients not to be cached, but objects
requested by proxy-standard to be cached normally.

Tried this:

  cache deny proxy-basic
  cache allow all

And this:

  cache allow proxy-standard
  cache deny all

And many other different configs. Does not work as desired.

The result is always the same, either all objects are cached, or no
objects at all are cached.

Even if I try a simple configuration like this, objects are never
cached:

  cache allow proxy-standard

If I use ANY "cache ___" directive other than a (useless) "cache allow
all", caching is completely disabled for all ACLs.

What am I doing wrong? Are those ACLs unsuitable for configuring
caching with cache directives?

I haven't found any examples in the net about how to do achieve what I
want to do. As far as I remember, this used to work with the old 3.x
setup (this is gone, cannot test this any more).

Thanks for help.

Robert


-- 
Robert Senger




More information about the squid-users mailing list