#FIXME - configurable
cache_mem <%= node[:squid][:cache_mem] %>
+<% if node[:squid][:version] > 2 -%>
+
+workers <%= node[:cpu][:total] %>
+
+error_log_languages off
+<% end -%>
max_filedescriptors 98304
http_port 80 accel defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6 http11
<% else -%>
http_port 80 accel no-vhost defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6
-
-#prefer IPv4 until everything is upgraded
-dns_v4_first on
<% end -%>
cache_effective_user proxy
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