Created
December 6, 2019 23:12
-
-
Save kmaraz/a8dadab4378e2686591ea700c150179b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workbox.routing.registerRoute( | |
new RegExp('/assets/'), | |
new workbox.strategies.CacheFirst({ | |
cacheName: 'assets', | |
plugins: [ | |
new workbox.expiration.Plugin({ | |
maxEntries: 50, | |
maxAgeSeconds: 30 * 24 * 60 * 60, | |
purgeOnQuotaError: true | |
}), | |
], | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment