Default cache
Thecaches.default API follows the web browsers’ Cache API interface closely. It gives you a single, unnamed cache shared across requests.
Named caches
You may create and manage additional Cache instances via thecaches.open method. Named caches are useful when you want to version cache contents (e.g. cache:v1, cache:v2) so a deploy can switch over cleanly.
Note: When using the Cache API, avoid overriding the hostname in cache requests, as this can lead to unexpected behaviour when using multiple domains associated with a PullZone.
References
- Reading & writing: the
match,put, anddeletemethod reference. - Examples: end-to-end recipes using named and default caches.
- Cache API overview: regional behavior, limitations, and API surface.