fastcgi - Nginx Variable Cache Time -


i'm working fastcgi_cache , wanted pass variable fastcgi_cache_valid have variable amount of cache time depending on file. seems not accept variable.

i tried following:

set $cache_time 15s; fastcgi_cache_valid 200 ${cache_time}; fastcgi_cache_valid 200 $cache_time;   set $cache_time "15s"; fastcgi_cache_valid 200 ${cache_time}; fastcgi_cache_valid 200 $cache_time;   set $cache_time 15; fastcgi_cache_valid 200 ${cache_time}s; fastcgi_cache_valid 200 $cache_time; 

but receieved following errors:

nginx: [emerg] invalid time value "$cache_time" in /etc/nginx/conf.d/www.com.conf:118  nginx: [emerg] directive "fastcgi_cache_valid" not terminated ";" in /etc/nginx/conf.d/www.com.conf:118 


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -