Adding proxy_cache_path_hash flag in order to use either a string or

hash value
This commit is contained in:
Jacob McCoy Wade 2015-06-02 10:48:57 -07:00
parent 796bf63893
commit 16d76a9c15

View file

@ -69,6 +69,7 @@ class nginx::config(
$proxy_cache_keys_zone = 'd2:100m',
$proxy_cache_levels = '1',
$proxy_cache_max_size = '500m',
$proxy_cache_path_hash = 'string',
$proxy_cache_path = false,
$proxy_connect_timeout = '90',
$proxy_headers_hash_bucket_size = '64',
@ -113,7 +114,10 @@ class nginx::config(
}
validate_bool($confd_purge)
validate_bool($vhost_purge)
if ($proxy_cache_path != false) {
if ($proxy_cache_path_hash != 'string') {
validate_hash($proxy_cache_path)
}
elsif ($proxy_cache_path != false) {
validate_string($proxy_cache_path)
}
validate_re($proxy_cache_levels, '^[12](:[12])*$')