Skip to content

NexusJS: Prevent cache poisoning on updated assets#177

Open
sdumetz wants to merge 2 commits into
cnr-isti-vclab:masterfrom
sdumetz:fix/indexeddb-cache-invalidation
Open

NexusJS: Prevent cache poisoning on updated assets#177
sdumetz wants to merge 2 commits into
cnr-isti-vclab:masterfrom
sdumetz:fix/indexeddb-cache-invalidation

Conversation

@sdumetz

@sdumetz sdumetz commented Jun 17, 2026

Copy link
Copy Markdown

When an asset is updated, the current indexedDB cache doesn't pick up the change as it's keyed only by url . It results in potentially mangled textures or plain errors.

This fix tries to ensure cache freshness before use.
The second commit makes it even safer, using the ETag header if present. Otherwise it relies on mesh statistics that are very likely, but not guaranteed, to change when it is updated.

An additional fix addresses let request = transaction.objectStore('tex').get(node.id);, which could collide if a texture was used by more than one node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant