English
@vite-pwa/workbox-swkit/precaching
PackageDeclaration: @vite-pwa/workbox-swkit/precaching
Class Summary
| Type | Description |
|---|---|
| PrecacheController | Performs efficient precaching of assets. |
| PrecacheFallbackPlugin | PrecacheFallbackPlugin allows you to specify an "offline fallback" response to be used when a given strategy is unable to generate a response. |
| PrecacheRoute | A subclass of workbox-routing.Route that takes a workbox-precaching.PrecacheController instance and uses it to match incoming requests and handle fetching responses from the precache. |
| PrecacheStrategy | A workbox-strategies.Strategy implementation specifically designed to work with workbox-precaching.PrecacheController to both cache and fetch precached assets. |
Function Summary
| Name | Description |
|---|---|
| addPlugins | Adds plugins to the precaching strategy. |
| addRoute | Add a fetch listener to the service worker that will respond to [network requests]https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests with precached assets. |
| cleanupOutdatedCaches | Adds an activate event listener which will clean up incompatible precaches that were created by older versions of Workbox. |
| createHandlerBoundToURL | Helper function that calls PrecacheController#createHandlerBoundToURL on the default PrecacheController instance. |
| getCacheKeyForURL | Takes in a URL, and returns the corresponding URL that could be used to lookup the entry in the precache. |
| matchPrecache | Helper function that calls PrecacheController#matchPrecache on the default PrecacheController instance. |
| precache | Adds items to the precache list, removing any duplicates and stores the files in the workbox-core.cacheNames|"precache cache" when the service worker installs. |
| precacheAndRoute | This method will add entries to the precache list and add a route to respond to fetch events. |
Interface Summary
| Type | Description |
|---|---|
| CleanupResult | |
| InstallResult | |
| Parallel | Controls parallel precaching of assets during service worker installation. When enabled, assets are fetched concurrently up to concurrency at a time instead of one by one. |
| PrecacheEntry | |
| PrecacheOptions | |
| PrecacheRouteOptions |
Type Alias Summary
| Name | Description |
|---|---|
| urlManipulation |