Skip to content

Instantly share code, notes, and snippets.

@kmaraz
Last active December 8, 2019 14:54
Show Gist options
  • Save kmaraz/f833f9960996afd20f002e7382853ccc to your computer and use it in GitHub Desktop.
Save kmaraz/f833f9960996afd20f002e7382853ccc to your computer and use it in GitHub Desktop.
async clearCache() {
await caches.keys().then((cacheNames) => {
cacheNames.forEach((cacheName) => {
caches.delete(cacheName);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment