Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1

share|improve this answer
add comment

Your Answer

 
discard

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.