itk-vtk-image-viewer
Version:
ITK/VTK Image Viewer
16 lines (13 loc) • 371 B
JavaScript
importScripts('workbox-sw.prod.v2.1.2.js');
const workboxSW = new self.WorkboxSW({clientsClaim: true})
workboxSW.precache([])
workboxSW.router.registerRoute(
/\.js|\.png|\.wasm$/,
workboxSW.strategies.staleWhileRevalidate({
cacheName: 'staleWhileRevalidateContent',
cacheExpiration: {
maxEntries: 50,
maxAgeSeconds: 7 * 24 * 60 * 60 * 26,
}
})
);