📅  最后修改于: 2022-03-11 15:02:21.590000             🧑  作者: Mango
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))
);
}());
});