r/squid: Support custom cache rules

Instead of hard-coding a single cache directory and a set of refresh
patterns, the *squid* role can now have custom cache rules defined with
the `squid_cache_dir` variable (which now takes a list of `cache_dir`
settings) and the `squid_refresh_pattern` variable (which takes a list
of refresh patterns).  If neither of these are defined, the default
configuration is used.

This is a breaking change, since `squid_cache_dir` used to refer to a
directory, and the previous default was to configure one cache path.
There are no extant users of this role, though, so it doesn't really
matter.
This commit is contained in:
2024-01-27 19:57:19 -06:00
parent af18a575d1
commit 1d94dc9528
4 changed files with 34 additions and 18 deletions

View File

@@ -1,8 +1,5 @@
squid_max_object_size: 4096 MB
squid_cache_replacement_policy: heap LFUDA
squid_cache_dir_type: aufs
squid_cache_dir: /var/cache/squid
squid_cache_dir_max_size: 51200
squid_cache_dir_l1: 16
squid_cache_dir_l2: 256
# squid_cache_dir:
# - aufs /var/cache/squid 51200 16 256
squid_access_log: syslog:daemon.info