Skip to content

Commit

Permalink
rename item to fit cache name
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed May 22, 2020
1 parent efb0201 commit 518f6e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web_src/js/features/serviceworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ async function invalidateCache() {

async function checkCacheValidity() {
const cacheKey = AppVer;
const storedCacheKey = localStorage.getItem('serviceWorkerCacheKey');
const storedCacheKey = localStorage.getItem('staticCacheKey');

// invalidate cache if it belongs to a different gitea version
if (cacheKey && storedCacheKey !== cacheKey) {
invalidateCache();
localStorage.setItem('serviceWorkerCacheKey', cacheKey);
localStorage.setItem('staticCacheKey', cacheKey);
}
}

Expand Down

0 comments on commit 518f6e9

Please sign in to comment.