I have a couple of queries related to Cache-Control.
If I specify Cache-Control
max-age=3600, must-revalidate for a static html/js/images/css file, with Last Modified Header defined in HTTP header:
- Does browser/proxy cache(like Squid/Akamai) go all the way to origin server to validate before max-age expires? Or will it serve content from cache till max-age expires?
- After max-age expiry (that is expiry from cache), is there a If-Modified-Since check or is content re-downloaded from origin server w/o If-Modified-Since check?
I believe that
must-revalidate means "once the cache expires, refuse to return stale responses to the user even if they say that they are acceptable". Whereas
must-revlidate plus the fact the response becomes stale right away.
If a response is cacheable for 10 seconds, then
must-revalidate kicks in after 10 seconds, whereas
must-revalidate after 0 seconds.
At least, that's my interpretation.