Skip to content

Instantly share code, notes, and snippets.

@goofmint

goofmint/index.js

Created Nov 19, 2018
Embed
What would you like to do?
workbox.routing.registerRoute(/\.(?:png|gif|jpg|jpeg|svg)$/,
workbox.strategies.cacheFirst({
cacheName: 'images',
plugins: [
new workbox.expiration.Plugin({
maxEntries: 60,
maxAgeSeconds: 30 * 24 * 60 * 60, // 30 Days
}),
],
}),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment