Concept
Cache-Control, ETag and Last-Modified let browsers and CDNs reuse responses, so the server does less and pages load faster. Public, cacheable data gets a max-age; private data gets no-store.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show HTTP caching doing its job.
app.get("/catalog/:sku", async (req, reply) => {
const product = await catalog.get(req.params.sku);
const etag = '"' + product.version + '"';
if (req.headers["if-none-match"] === etag) return reply.code(304).send();
return reply
.header("etag", etag)
.header("cache-control", "public, max-age=60, stale-while-revalidate=600")
.send(product);
});Setting a long max-age on a response that includes user-specific data. A shared cache or CDN then serves one user's page to another. Private data is no-store or at least private.
Your roadmap puts these before HTTP caching, unless you already know them.
Once a session shows you understand HTTP caching, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.