Design a caching strategy end to end: Cache-Control semantics, CDN keys and Vary, stale-while-revalidate, invalidation with tags, and the bugs that serve one user's data to another.
A request for a page can be answered by any of these layers, and each has different rules:
Cache-Control, ETag, Last-Modified.s-maxage, Surrogate-Control, and the CDN's own config.The architect's job is to decide, per resource, which layers may store it, for how long, and how it gets invalidated. The two classic failures are opposite:
A useful mental split: immutable assets (hashed JS/CSS/images), shared documents (public pages, public API data), and private data (anything that varies by user). Each class gets a standard policy.