Guest User

Untitled

a guest
Oct 17th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. workbox.routing.registerRoute(
  2. new RegExp('xy/xyzAPI/api'),
  3. workbox.strategies.staleWhileRevalidate({
  4. cacheName: 'api-url',
  5. plugins: [
  6. new workbox.expiration.Plugin({
  7. maxEntries: 20,
  8. maxAgeSeconds: 24 * 60 * 60
  9. }),
  10. new workbox.broadcastUpdate.Plugin('api-url', {
  11. headersToCheck: ['date'],
  12. })
  13. ]
  14. }));
Add Comment
Please, Sign In to add comment