diff --git a/src/js/commandline-lists.js b/src/js/commandline-lists.js index 9fa31ac3a..3ab03516a 100644 --- a/src/js/commandline-lists.js +++ b/src/js/commandline-lists.js @@ -3060,7 +3060,10 @@ export let defaultCommands = { display: "Clear SW cache", icon: "fa-cog", exec: async () => { - await caches.delete("sw-cache"); + let caches = await caches.keys(); + for (let name of caches) { + caches.delete(name); + } window.location.reload(true); }, }, diff --git a/src/js/elements/new-version-notification.js b/src/js/elements/new-version-notification.js index 833bf2d6d..fb03bd8d4 100644 --- a/src/js/elements/new-version-notification.js +++ b/src/js/elements/new-version-notification.js @@ -19,10 +19,14 @@ export async function show(version) { window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" ) { - caches.delete("sw-cache"); + caches.keys().then(function (names) { + for (let name of names) caches.delete(name); + }); } if (memory === version) return; - caches.delete("sw-cache"); + caches.keys().then(function (names) { + for (let name of names) caches.delete(name); + }); Notifications.addBanner( `Version ${version} has been released. Click the version number in the bottom right to view the changelog.`, 1,