cache all endpoints but one: nginx settings

gg4u nginx-forum at forum.nginx.org
Mon Oct 10 19:14:33 UTC 2016


thank you Maxim, 
I ll try with your suggestions.
So basically, if I have a "production" server and a proxy server in front of
it, I just need cache on the proxy server
(http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid)
, and not cache responses on the production server?

I have this setting on production server:

                # Set Cache for my Json api
                location ~* \.(?:json)$ {
                  expires 1M;
                  access_log off;
                  add_header Cache-Control "public";
                }

But if I am using a proxy server it is useless, correct?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,270058,270167#msg-270167



More information about the nginx mailing list