0

I'm trying to use "purge' util that comes with squid 3.3.8 to purge some objects in squid cache, and with ufs store. "purge" works fine, it can extract URL from cached objects, but with rock store, which is available sine squid 3.2, "purge" reports the following error:

no cache_dir or error accessing "/opt/squid/3.3.8/etc/squid.conf"

Here is the the corresponding squid.conf:

pid_filename /var/run/squid.pid

cache_effective_user user
cache_effective_group user

http_port 3128
cache_mem 0 MB
#cache_dir ufs /var/squid/cache/ 500 16 256
cache_dir rock /var/squid/rock  5120 max-size=102400
acl my_machine src 192.168.2.22
http_access allow my_machine

acl localnet src 127.0.0.1
acl Purge method PURGE
http_access allow localnet Purge
http_access deny all Purge

Is there something wrong with my config file, or squid purge does not work with rock store?

Daniel Dai
  • 1,019
  • 11
  • 24

1 Answers1

0

I just read source code of purge, in /purge/conffile.cc, it use the following regex to search cache_dir in squid.conf;

^[ \t]*cache_dir([ \t]+([[:alpha:]]+))?[ \t]+([[:graph:]]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)

This regex can only match ufs, aufs and diskd, but can not match rock:

cache_dir rock /var/squid/rock  5120 max-size=102400

From this point of view, purge does not support rock store.

Daniel Dai
  • 1,019
  • 11
  • 24