Definition
Cache Storage API
The Cache Storage API, exposed as the global caches object, lets a service worker (or page) store Request/Response pairs in named caches, e.g. caches.open("shell-v1").then((cache) => cache.put("/logo.png", response)). Unlike the HTTP cache, it is fully scriptable, has no automatic eviction schedule tied to headers, and persists until explicitly deleted or the storage quota is exceeded.
Reading back a cached response is as simple as caches.match(request), which searches every open cache by default unless a specific cache name is passed, matching by request URL and method.
Storage is per-origin and shares the same quota as IndexedDB and localStorage; browsers use a "least recently used" eviction policy across all of an origin's storage once the device is low on space, which is why caches should be versioned and pruned rather than left to grow unbounded.
Cache Storage entries are opaque to the network layer — putting a response in cache does not affect how the browser's HTTP cache behaves, and the two systems operate independently even though a fetch() call can populate both.
The full API surface (Cache, CacheStorage interfaces) is documented at https://developer.mozilla.org/en-US/docs/Web/API/Cache.