Adding a version of proxy_cache_path that will work with either a hash
value or a string value
This commit is contained in:
parent
16d76a9c15
commit
f92b895cb9
1 changed files with 5 additions and 2 deletions
|
@ -64,9 +64,12 @@ http {
|
|||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
||||
|
||||
<% end -%>
|
||||
<% if @proxy_cache_path -%>
|
||||
<% if @proxy_cache_path_hash != 'string' -%>
|
||||
<% @proxy_cache_path.sort_by{|k,v| k}.each do |key,value| -%>
|
||||
proxy_cache_path <%= key %> keys_zone=<%= value %> levels=<%= @proxy_cache_levels %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>;
|
||||
<% end -%>
|
||||
<% elsif @proxy_cache_path -%>
|
||||
proxy_cache_path <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>;
|
||||
|
||||
<% end -%>
|
||||
<% if @fastcgi_cache_path -%>
|
||||
fastcgi_cache_path <%= @fastcgi_cache_path %> levels=<%= @fastcgi_cache_levels %> keys_zone=<%= @fastcgi_cache_keys_zone %> max_size=<%= @fastcgi_cache_max_size %> inactive=<%= @fastcgi_cache_inactive %>;
|
||||
|
|
Loading…
Reference in a new issue