Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash suffix not a reliable identifier for caching #8

Open
donmccurdy opened this issue Dec 2, 2022 · 0 comments
Open

Hash suffix not a reliable identifier for caching #8

donmccurdy opened this issue Dec 2, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed P3

Comments

@donmccurdy
Copy link
Contributor

We append a hash suffix to output files, e.g. scene.ba38z8.glb. The goal of the hash is that new deployments shouldn't invalidate caching of large files. However, the method used to compute the hash is imperfect — it's a binary hash of the input file.

It may be better to either hash the output file's content, or to hash a combination of the input file and the transforms being applied to it. Probably the former.

See:

https://github.com/nytimes/bundler-plugin-gltf/blob/5b252ca48c11ba97233bb37af96ececc3be90a71/packages/core/core.js#L161-L166

The hash can be disabled with the {hash: false} option.

@donmccurdy donmccurdy added enhancement New feature or request help wanted Extra attention is needed P3 labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed P3
Projects
None yet
Development

No branches or pull requests

1 participant