Skip to content

Commit 4ebceb8

Browse files
committed
2 parents 967261a + 462bc96 commit 4ebceb8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

BlueMapCommon/webapp/src/js/BlueMapApp.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,12 @@ export class BlueMapApp {
598598
return;
599599
}
600600

601-
this.mapViewer.clearTileCache(this.loadUserSetting("tileCacheHash", this.mapViewer.tileCacheHash));
601+
// Only reuse the user's tile cash hash if the current browser navigation event is not a reload.
602+
// If it's a reload, we assume the user is troubleshooting and actually wants to refresh the map.
603+
const [entry] = performance.getEntriesByType("navigation");
604+
if (entry.type != "reload") {
605+
this.mapViewer.clearTileCache(this.loadUserSetting("tileCacheHash", this.mapViewer.tileCacheHash));
606+
}
602607

603608
this.mapViewer.superSampling = this.loadUserSetting("superSampling", this.mapViewer.data.superSampling);
604609
this.mapViewer.data.loadedHiresViewDistance = this.loadUserSetting("hiresViewDistance", this.mapViewer.data.loadedHiresViewDistance);

0 commit comments

Comments
 (0)