IDBStorageEnabled = true , load gltf and bin, still use old indexDB data when version +1 in manifest file from server

babylon version: 7.22.3
load api: SceneLoader.ImportMeshAsync
file: scene.gltf , scene.bin , other textures.

When I use IDBStorageEnabled = true, load scene.gltf(with scene.bin) from server, the scene.gltf.manifest In the same folder:
{
“version” : 1,
“enableSceneOffline” : false,
“enableTexturesOffline” : false
}

I can load it successful.
Then, I update scene.gltf and scene.bin in server , and change scene.gltf.manifest :
{
“version” : 2,
“enableSceneOffline” : false,
“enableTexturesOffline” : false
}

Now , load scene.gltf unsuccessful:
Uncaught (in promise) Error: Unsupported geometry type.
at decodeMesh (dc4aae5c-806a-4cda-8212-54a29bfc79be:37:17)
at dc4aae5c-806a-4cda-8212-54a29bfc79be:130:29

Then I Delete indexedDB data from browser, I can load scene.gltf successful!

I speculate that when the gltf model version on the server changes, the front end does not load the latest bin file correctly, resulting in the new gltf file and the old bin file.

IDK if indexedDB has a cache mecanism. I guess it’s more on the browser side?
cc @RaananW

We have a caching system based on indexedDB.

@HouLingLXH , would you be able to reproduce that on the playground so I can trace the source of the wrong call? I am pretty sure you are right we just need to see where we make the call that skips the caching mechanism.

1 Like

You need change your assets path, and update it to test.

Update:
use same name model(gltf + bin ) to replace old model in server,
change version (+1) in manifest

Test
replay

now you load the new manifest with new version, but, load the old mesh to scene.

if I move from v2 to v3 it works as expected. At what version does it fail?

quick note - v3 seems to not render correctly, however it does load without an error. This is unrelated to the database. even if I load v3 standalone after emptying the database the same thing happens.

Tell me exactly what you did

You need to load your gltf from your server, then change the gltf and manifest file to test, instead of change “https://raw.githubusercontent.com/HouLingLXH/publicAssets/master/bblPG/testIndexDB/v2/” to “https://raw.githubusercontent.com/HouLingLXH/publicAssets/master/bblPG/testIndexDB/v3/