Reverse proxy caching for dynamic content

flierps nginx-forum at forum.nginx.org
Thu May 16 04:59:28 UTC 2019


When max-age=0 in the Cache-Control header, Nginx will not cache, so that
will not work.
I need this in cache-control to make sure all browsers will revalidate.

So, as far as I can see I can chose between:
1. ignore cache-control header, need to set proxy_valid or nothing will be
cached minimum is 1s.
2. not ignore cache-control, but obliged to set max-age or nothing will be
cached minimum is 1s.

Nginx should be able to cache even when max-age is set to 0. There are valid
reasons to cache when max-age is 0.

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



More information about the nginx mailing list