1 2 3 4 5 6 7 8 9 10 11 12
// Touch CacheStorage, but then idle and do nothing. const name = "idle_worker_cache"; var cache; self.caches .open(name) .then(c => { cache = c; return self.caches.delete(name); }) .then(_ => { postMessage("LOADED"); });