Last active
February 19, 2016 21:47
-
-
Save petebrowne/af66e718de5cd1322576 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.addEventListener('activate', event => { | |
event.waitUntil( | |
caches.keys().then(cacheNames => { | |
return Promise.all( | |
cacheNames.map(cacheName => { | |
if (cacheName !== CACHE_NAME) { | |
console.log('Deleting out of date cache:', cacheName); | |
return caches.delete(cacheName); | |
} | |
}) | |
); | |
}) | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment