I have a slow backend application that I'm using nginx to provide the authentication and caching for. It's been working great however there is one nagging issue that I cannot seem to resolve, when the backend app sets a s-maxage and a maxage Cache-Control, nginx only seems to honor the maxage and expires the cache with its value.
An example response from the backend is like this... Cache-Control: max-age=60, s-maxage=3600, public, must-revalidate My idea here is I only want the client to cache this data for a short amount of time before checking in with me it see if it's still valid. The data usually wont be changing that often so I want nginx to cache it for an hour, but in the event it does I use the excellent nginx-cache-purge script in my backend app to invalidate the cache and the next time a client checks in (after 60 seconds) they will get the new data. However in all my testing and usage I will only get a cache HIT for 60 seconds after the first request to a resource, after 60 seconds it will be EXPIRED then it will go to the backend again. Am I missing something in the Cache-Control that is causing this behavior? -- Ryan Parrish
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
