Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- workbox.routing.registerRoute(
- new RegExp('xy/xyzAPI/api'),
- workbox.strategies.staleWhileRevalidate({
- cacheName: 'api-url',
- plugins: [
- new workbox.expiration.Plugin({
- maxEntries: 20,
- maxAgeSeconds: 24 * 60 * 60
- }),
- new workbox.broadcastUpdate.Plugin('api-url', {
- headersToCheck: ['date'],
- })
- ]
- }));
Add Comment
Please, Sign In to add comment