Add content hashes to asset URLs
Merged
HA
4mo ago+299+299+012345678901234567890123456789-8-8-0123456789
Closes #6550.
Adds content-hash cache busting to rx.asset URLs by appending an 8-character SHA-256 query parameter based on the
asset file contents.
Example:
rx.asset("logo.svg") now returns /logo.svg?v=<hash>.
The hash changes only when the file content changes, allowing browsers to cache assets safely across deploys.
Implementation notes:
- Applies to both local and shared assets.
- Keeps
AssetPathStr.importable_pathunversioned so existing build-time import behavior is preserved. - Preserves backend-only behavior for missing local assets.
- Adds regression coverage for hash changes and pickle/copy round trips.