Skip to content

Conversation

@mrchantey
Copy link
Contributor

@mrchantey mrchantey commented Aug 30, 2025

Objective

The current web assets impl has a placeholder cache that never invalidates, the http-cache-ureq crate provides proper http caching mechanism, which is non-trivial to implement ourselves.

Solution

  • Replace placeholder cache with http-cache-ureq

Testing

Verify with cargo run --example web_asset --features=https,web_asset_cache

Updates

@mrchantey mrchantey added A-Assets Load files from disk to use for things like images, models, and sounds C-Dependencies A change to the crates that Bevy depends on S-Blocked This cannot move forward until something else changes labels Aug 30, 2025
- call() is already async in http-cache-ureq v1.0.0-alpha.2
- The library handles async execution internally with smol::unblock
- Removed unnecessary unblock wrapper from cached path
- Keep unblock for non-cached path since plain ureq is synchronous
@mrchantey mrchantey changed the title Draft: use http-cache for web assets Use http-cache for web assets Jan 19, 2026
@github-actions
Copy link
Contributor

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

@mrchantey mrchantey added C-Feature A new feature, making something new possible and removed S-Blocked This cannot move forward until something else changes labels Jan 21, 2026
@mrchantey
Copy link
Contributor Author

mrchantey commented Jan 21, 2026

Currently failing due to prelease git dep http-cache-ureq, the author has been helping us with our deps and licence requirements which we've recently resolved.

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

Labels

A-Assets Load files from disk to use for things like images, models, and sounds C-Dependencies A change to the crates that Bevy depends on C-Feature A new feature, making something new possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant