I'm using Squid 2.7.STABLE9, which I compiled from source.

My understanding of no-cache is that the cache must revalidate with the origin server before serving up a cached copy of the resource, and that this takes place with an If-Modified-Since header.

My understanding of s-maxage is that a shared cache/proxy should consider the resource fresh for the given number of seconds.

My expectation is that Cache-Control: no-cache, s-maxage=300 should trigger Squid to consider the resource fresh for 5 minutes and it should revalidate with the origin server before serving the cached version.

Am I understanding the usage of these headers correctly? If so, should I expect this behavior Squid to carry out this behavior when configured as a reverse proxy?


In your example the no-cache entry does not specify a field name, so this section applies:

no-cache If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.