@preference-sl/pref-viewer 2.13.0-beta.20 → 2.13.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preference-sl/pref-viewer",
3
- "version": "2.13.0-beta.20",
3
+ "version": "2.13.0-beta.21",
4
4
  "description": "Web Component to preview GLTF models with Babylon.js",
5
5
  "author": "Alex Moreno Palacio <amoreno@preference.es>",
6
6
  "scripts": {
@@ -755,9 +755,12 @@ export default class FileStorage {
755
755
  }
756
756
  await this.#runCleanupIfDue();
757
757
  let storedFile = await this.#getFile(uri);
758
- const serverFileTimeStamp = storedFile ? await this.#getServerFileTimeStamp(uri) : 0;
759
- const storedFileTimeStamp = storedFile ? storedFile.timeStamp : 0;
760
- if (!storedFile || (storedFile && serverFileTimeStamp !== null && serverFileTimeStamp !== storedFileTimeStamp)) {
758
+ // If there is already a cached file, return it without HEAD revalidation.
759
+ // In ecommerce flow, new IDs/URLs from WASM drive real resource updates.
760
+ if (storedFile) {
761
+ return storedFile;
762
+ }
763
+ if (!storedFile) {
761
764
  const fileToStore = await this.#getServerFile(uri);
762
765
  if (fileToStore && !!(await this.#putFile(fileToStore, uri))) {
763
766
  storedFile = await this.#getFile(uri);