Answer the question
In order to leave comments, you need to log in
Nginx not deleting cache, how to fix?
Greetings, there is a site on Bitrix - nginx + php-fpm. Static is already cached on it:
location ~* \.(css|js|gif|png|jpg|jpeg|ico|ogg|ttf|woff|eot|otf)$ {
error_page 404 /404.html;
expires 30d;
}
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=all:64m max_size=1g;
proxy_cache_key $request_uri;
proxy_cache_valid 5m;
Answer the question
In order to leave comments, you need to log in
In the documentation nginx.org/en/docs/http/ngx_http_proxy_module.html#...
Parameters of caching can also be set directly in the response header. This has higher priority than setting of caching time using the directive.
parameters of caching may be set in the header fields “Expires” or “Cache-Control”.
proxy_cache_valid 5m;
I also thought the browser at first. I cleared my entire history, cookies and cache - it still gave the old image, changed the site address to nginx from bitrix in /etc/hosts - gives out a new one, rearranged it back - still the old one. The old and new have different Last-Modified headers. I cleared the cache on the proxy - only then issued a new one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question