From 518f6e9075f24ee621c177a0da5995df6e90b283 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 22 May 2020 03:08:51 +0200 Subject: [PATCH] rename item to fit cache name --- web_src/js/features/serviceworker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/js/features/serviceworker.js b/web_src/js/features/serviceworker.js index a26875d200e72..a8fd2d41df833 100644 --- a/web_src/js/features/serviceworker.js +++ b/web_src/js/features/serviceworker.js @@ -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); } }