• private: the response may be stored only by a browser's cache • no-cache: the stored response MUST always go through validation with the origin server fi rst before using it • no-store: the response may not be stored in any cache. • no-transform: an intermediate cache or proxy cannot edit the response body • must-revalidate: indicates that once a resource becomes stale, caches must not use their stale copy without successful validation on the origin server. Cache-Control
considered fresh • max-stale[=<seconds>]: indicates the client will accept a stale response. • min-fresh=<seconds>: indicates the client wants a response that will still be fresh for at least the speci fi ed number of seconds. • stale-while- revalidate=<seconds>: indicates the client will accept a stale response, while asynchronously checking in the background for a fresh one • stale-if-error=<seconds>: indicates the client will accept a stale response if the check for a fresh one fails. Cache-Control
text/html,*/* Accept-Language: fr-FR,en Cookie: session_id=wxyz9876; yummy_cookie=choco; tasty_cookie=strawberry referer: https://news.example.com/ A cache hit 🎉 because Cloudfront doesn’t consider the case of the header name
text/html,*/* Accept-Language: fr-FR,en Cookie: session_id=wxyz9876; yummy_cookie=choco; tasty_cookie=strawberry referer: HTTPS://NEWS.EXAMPLE.COM/ A cache miss ☹ because Cloudfront does consider the case of the header value
text/html,*/* Accept-Language: fr,en Cookie: session_id=wxyz9876 Referer: https://news.example.com/ A cache miss ☹ because fr-FR and fr are not the same thing even though they both mean the user language is French