Skip to content

CacheableResponsePlugin ​

Class @vite-pwa/workbox-swkit/cacheable-response

A class implementing the cacheWillUpdate lifecycle callback. This makes it easier to add in cacheability checks to requests made via Workbox's built-in strategies.

Constructor ​

ts
new CacheableResponsePlugin(config: CacheableResponseOptions)

To construct a new CacheableResponsePlugin instance you must provide at least one of the config properties.

If both statuses and headers are specified, then both conditions must be met for the Response to be considered cacheable.

Released under the MIT License.