caches.open(cacheName).then(cache => {
// Add all the default files to the cache
console.log('[Service Worker] Caching Assets Files');
return cache.addAll(cacheFiles);
})); // end e.waitUntil
async () => {
const cache = await caches.open(cacheName)
for (бла-бла) {
await cache.add(cacheFiles[индекс])
}
}