Imagine an API endpoint that returns the public profile for user 42:
If the profile has not changed, repeatedly transferring the same JSON wastes network bandwidth, consumes server capacity, and makes clients wait longer than necessary. An HTTP cache can store a previous response and reuse it for a later request.
That simple idea immediately raises correctness questions:
HTTP caching is the protocol machinery that answers these questions. It is not merely a performance trick. A cache that reuses the wrong response can expose private data or serve an incorrect representation, so HTTP defines explicit rules for storage, selection, freshness, and validation.
This chapter follows those rules through browser caches, proxies, and CDNs and turns them into practical response policies for backend services.