I’m experiencing persistent terrain rendering in my Cesium application even after deleting all terrain source files and restarting my computer. The terrain appears to be cached somewhere that survives browser cache clearing, computer restarts, and file deletion.
Setup:
- Cesium.js v1.89.0
- Custom terrain from LIDAR data converted to quantized-mesh tiles using Cesium Terrain Builder
- CesiumTerrainProvider pointing to local server:
http://localhost:8082/ - Terrain files originally served via Python HTTP server with CORS
Observed Behavior:
-
Terrain loads correctly when files exist
-
After deleting terrain files: NY20NW area still shows elevation (885m) while other areas show undefined elevation
-
Browser investigation shows: CesiumTerrainProvider active, requesting tiles that return 404
-
Server logs show:
GET /4/16/7.terrain?v=1.1.0 404 (File not found) -
Cache clearing attempts: Browser cache, hard refresh, incognito mode, complete viewer destruction/recreation - none work
Debug Evidence:
javascript
console.log('Terrain Provider Type:', viewer.terrainProvider.constructor.name);
// Shows: CesiumTerrainProvider (not EllipsoidTerrainProvider)
// Elevation sampling shows:
// NY20NW: 885.1063535511208 meters
// Equator: undefined meters
Key Questions:
- Where does Cesium cache terrain tiles beyond browser storage (LocalStorage/SessionStorage are empty)?
- Could IndexedDB or some internal Cesium cache be persisting tiles?
- Is there a way to completely purge all Cesium terrain cache programmatically?
- Are there any Docker/system-level caches that might be involved?
What I’ve Tried:
viewer.destroy()and recreation- All browser cache clearing methods
- Computer restart
- Different browsers (Safari works correctly, main browser doesn’t)
- Nuclear cache clearing (LocalStorage, SessionStorage, IndexedDB deletion)
The fact that specific terrain tiles persist while new requests return 404 suggests Cesium has cached the quantized-mesh data somewhere that survives typical cache clearing methods. Any insights into Cesium’s internal caching mechanisms would be greatly appreciated!