importScripts('/sw-toolbox.js'); // https://github.com/GoogleChrome/sw-toolbox/ const prefix = 'project-v1'; toolbox.router.get('assets/*', req => { const staticFilePattern = /.*-[0-9a-f]{10}\..*/; if (staticFilePattern.test(req.url)) { return toolbox.cacheFirst(req, [], { cache: { name: `${prefix}-static`, maxEntries: 1000 } }); } return toolbox.networkOnly(req); }