mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
fix: Update registerServiceWorker.js (delete all cache on when new version is released)
Empty the cache when a release is changed. When the release data is refreshed, the page is updated without a forced refresh.
This commit is contained in:
parent
e1ca41b917
commit
d846c92493
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,9 @@ if (process.env.NODE_ENV === 'production') {
|
|||
},
|
||||
updated() {
|
||||
console.log('New content is available; please refresh.')
|
||||
caches.keys().then(function (names) {
|
||||
for (const name of names) caches.delete(name)
|
||||
})
|
||||
},
|
||||
offline() {
|
||||
console.log(
|
||||
|
|
Loading…
Add table
Reference in a new issue