0

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?

dbrown0708
  • 101
  • 1

1 Answers1

1

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

Hendrik Brummermann
  • 336
  • 2
  • 4
  • 11