Skip to content

Hash suffix not a reliable identifier for caching #8

@donmccurdy

Description

@donmccurdy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions