X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/95c5b6eab1ab292c95ad3c1eb7ac729dee6757a5..0364daf8925f1dbba90ee38d58ed2b096db5cffc:/cookbooks/squid/templates/default/squid.conf.erb diff --git a/cookbooks/squid/templates/default/squid.conf.erb b/cookbooks/squid/templates/default/squid.conf.erb index 775f5ec6c..dabb406a3 100644 --- a/cookbooks/squid/templates/default/squid.conf.erb +++ b/cookbooks/squid/templates/default/squid.conf.erb @@ -5,6 +5,10 @@ visible_hostname <%= node.name %> #FIXME - configurable cache_mem <%= node[:squid][:cache_mem] %> +<% if node[:squid][:version] > 2 -%> + +workers <%= node[:cpu][:total] %> +<% end -%> max_filedescriptors 98304 @@ -46,7 +50,14 @@ cache_replacement_policy heap LFUDA memory_replacement_policy heap GDSF server_persistent_connections on +<% if node[:squid][:version] < 3 -%> persistent_request_timeout 1 minutes +<% else -%> +client_idle_pconn_timeout 1 minutes +<% end -%> +<% if node[:squid][:version] > 3 -%> +pconn_lifetime 5 minutes +<% end -%> negative_ttl 15 seconds half_closed_clients off