Skip to content

Commit 518f6e9

Browse files
committed
rename item to fit cache name
1 parent efb0201 commit 518f6e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/features/serviceworker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ async function invalidateCache() {
1515

1616
async function checkCacheValidity() {
1717
const cacheKey = AppVer;
18-
const storedCacheKey = localStorage.getItem('serviceWorkerCacheKey');
18+
const storedCacheKey = localStorage.getItem('staticCacheKey');
1919

2020
// invalidate cache if it belongs to a different gitea version
2121
if (cacheKey && storedCacheKey !== cacheKey) {
2222
invalidateCache();
23-
localStorage.setItem('serviceWorkerCacheKey', cacheKey);
23+
localStorage.setItem('staticCacheKey', cacheKey);
2424
}
2525
}
2626

0 commit comments

Comments
 (0)