serwistcache
v1.0.7
Published
A cache utility using Serwist for advanced service worker caching.
Maintainers
Readme
serwistcache
A cache utility using Serwist for advanced service worker caching.
Installation
npm install serwistcacheUsage
Usage
Import the default cache configuration function and use it in your service worker or Serwist setup:
import getDefaultCache from 'serwistcache';
// Use default (90 days)
const runtimeCaching = getDefaultCache();
// Or specify cache expiration (e.g., 60 days)
const runtimeCaching = getDefaultCache(60);
// Example with Serwist:
import { Serwist } from 'serwist';
new Serwist({
runtimeCaching,
// ...other options
});Build
npm run buildLicense
MIT
