Learn VisualLearn API

A Cache Decides Fresh or Stale Before It Ever Requests From the Server

Cache-Control on a response tells a cache how it may reuse that response later. max-age=60 means the response stays fresh for 60 seconds after it is received. During that time, the cache can return it without asking the server at all.

Once that time passes, the cache treats the response as stale. It doesn't reuse a stale response as it is. Before reusing it, the cache revalidates it or fetches it again.

no-store tells caches not to store the response at all, which suits sensitive data and content specific to that one request. private limits caching to the end user's own browser, so a shared cache such as a CDN can't serve one user's response to another.

GOAL

Trace a cache's fresh/stale decision from a response's Cache-Control directives, and explain what max-age, no-store, and private each control.

A response arrives with Cache-Control: max-age=60. A cache checks it again 90 seconds later. What does the cache do?