Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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