6 ms·
I highly recommend using Workbox: https://workboxjs.org/ https://workboxjs.org/. One of the more gnarly parts of ServiceWorker is having to clean up old caches
by davideast 9y ago
I highly recommend using Workbox: https://workboxjs.org/ https://workboxjs.org/.
One of the more gnarly parts of ServiceWorker is having to clean up old caches during a version change. The workbox-build module generates revision hashes for your pre-cached assets and handles any cache clean ups for you.