📜  asciicinema - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:21.590000             🧑  作者: Mango

代码示例1
self.addEventListener('activate', (event) => {
  event.waitUntil(async function() {
    const cacheNames = await caches.keys();
    await Promise.all(
      cacheNames.filter((cacheName) => {
        // Return true if you want to remove this cache,
        // but remember that caches are shared across
        // the whole origin
      }).map(cacheName => caches.delete(cacheName))
    );
  }());
});