Add DISABLE_CACHE config templating option.

This commit is contained in:
Will Rouesnel 2016-05-20 09:19:50 +10:00 committed by Will Rouesnel
parent 876e6e4b01
commit 90970c98a9
2 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,10 @@ variables:
If set to `yes` then squid configuration templating is disabled entirely, allowing
bind mounting the configuration file in manually instead. The certificate and SSL
setup still runs normally.
* `DISABLE_CACHE`
Default ``
If set to `yes` then squid configuration templating removes all `cache_dir`
lines, setting squid to memory only cache.
# Proxychains
By default squid in SSL MITM mode treats `cache_peer` entries quite differently.

View File

@ -10,8 +10,10 @@ netdb_filename stdio:/var/cache/squid4/netdb.state
# Visible hostname to allow multi-squid
visible_hostname {{VISIBLE_HOSTNAME|default:"docker-squid4"}}
{% if DISABLE_CACHE|default:"" != "yes" %}
# Cache directory is fixed since we'll bind mount.
cache_dir aufs /var/cache/squid4 {{MAX_CACHE_SIZE|default:"40000"}} 16 256
{% endif %}
maximum_object_size {{MAX_OBJECT_SIZE|default:"1536 MB"}}
cache_mem {{MEM_CACHE_SIZE|default:"128 MB"}}