nginx fastcgi_no_cache not working

I have set fastcgi_no_cache to 1. Which means not to cache, But, yet nginx caches it. I have to delete the cache directory every single time. Is there any way that I can disable caching for a server block?

server { listen 80; server_name fastcgi_no_cache 1; fastcgi_cache off; expires off; sendfile off; rewrite ^/about-us$ /about-us.php last; rewrite ^/more-info$ /more-info.php last; rewrite ^/features$ /features.php last; }

fast cgi config

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=DEFAULT:8m inactive=10m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; fastcgi_cache_use_stale error timeout invalid_header http_500; map $request_method $no_cache { default 0; POST 1; } map $query_string $no_cache { default 1; "" 0; } map $http_cookie $no_cache { default 1; "" 0; }

Category:php Views:2 Time:2017-09-09

Related post

Copyright (C), All Rights Reserved.

processed in 0.074 (s). 10 q(s)