Answer the question
In order to leave comments, you need to log in
How to reset nginx cache for a specific page?
When refreshing a page in cms, I try to reset the nginx cache for that page. Maybe there are some ways to reset the cache using nginx, so as not to go into the folder with the cache and not to search-delete the cache file by key with a script?
config snippet:
fastcgi_cache xxx;
fastcgi_cache_valid 200 1h;
fastcgi_cache_valid 404 1d;
fastcgi_cache_valid 301 302 304 1h;
fastcgi_cache_methods GET HEAD POST;
fastcgi_cache_min_uses 1;
fastcgi_hide_header Set-Cookie;
fastcgi_pass_header X-Accel-Expires;
fastcgi_cache_key $mykey;
fastcgi_ignore_headers Expires Cache-Control;
fastcgi_no_cache $cookie_nocache $arg_nocache; #Ответ не записываться в кеш - работает
fastcgi_cache_bypass $cookie_nocache $arg_nocache $http_x_updateq; #Ответ не должен браться из кэша - работает
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question