mdwelsh
mdwelsh

Reputation: 398

What is Squid's default caching policy with no Cache-Control header?

RFC2616 is somewhat vague about the "default" behavior of a caching proxy when no Cache-Control header is used in an HTTP response. For example, is it acceptable for Squid (or any other proxy cache) to cache the response indefinitely? Or is it necessary to revalidate on each request?

Upvotes: 1

Views: 3559

Answers (1)

M Nottingham
M Nottingham

Reputation: 5804

In the absence of explicit information (e.g., a Cache-Control: max-age or Expires header), caches can and do use "heuristic freshness" -- i.e., they guess.

However, when they do this, MOST (but not all) caches will look for a hint that it's useful to cache, such as a Last-Modified header.

More information:

Upvotes: 3

Related Questions