Skip to content

Commit 3535b11

Browse files
committed
chore: bump cache version
1 parent 90bf407 commit 3535b11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
function _resetCacheIfNeeded() {
139139
window.cacheClearError;
140140
const cacheKey = "browserCacheVersionKey";
141-
const newCacheVersion = "V7"; // just increment this number to V2, v3 etc. to force clear the cached content.
141+
const newCacheVersion = "V8"; // just increment this number to V2, v3 etc. to force clear the cached content.
142142
const lastClearedVersion = window.localStorage.getItem(cacheKey);
143143
if(lastClearedVersion === null){
144144
// setup First load flag, no cache, return.
@@ -173,8 +173,10 @@
173173
// and might not load new css classes if we don't reset. less doesn't cache in localhost.
174174
totalWaitTime += waitTime;
175175
if(window.less && less.refresh){
176+
localStorage.setItem(cacheKey, newCacheVersion);
177+
localStorage.setItem(LESS_REFRESH_SCHEDULED_KEY, "yes");
176178
less.refresh(true).finally(()=>{
177-
localStorage.setItem(cacheKey, newCacheVersion);
179+
localStorage.setItem(LESS_REFRESH_SCHEDULED_KEY, "no");
178180
location.reload();
179181
});
180182
clearInterval(intervalTimer);

0 commit comments

Comments
 (0)