i tried to use like this
server {
set $cache_time 1d;
if ($request_uri = "/") {
set $cache_time 3d;
}
if ($request_uri ~ "^/other") {
set $cache_time 30d;
}
location / {
try_files $uri @fetch;
}
location @fetch {
proxy_cache_valid 200 301 302 $cache_time;
}
}
then i got error "invalid time value "$cache_time" in /etc/nginx/xxx.conf
how can i fix this?
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,264539,264539#msg-264539
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx