Http-cache v1.0.0-alpha.1 Request for Testing
⚓ Rust 📅 2025-07-28 👤 surdeus 👁️ 11http-cache v1.0.0-alpha.1 - Request for Testing
Background
The http-cache collection of Rust crates implement HTTP caching middleware following RFC 7234 semantics. The crates provide caching for different HTTP clients including reqwest, surf, and tower services.
This alpha v1.0.0 release introduces significant new features, particularly around streaming responses and tower integration, which require thorough testing to ensure stability and performance. I understand this is a big ask given the nontrivial amount of code, but any help would be greatly appreciated.
Major Changes in Alpha Release
New Streaming Architecture
The alpha introduces a new streaming cache architecture that allows handling large HTTP responses without buffering them entirely in memory. This is particularly useful for applications dealing with large files or media streams.
This work builds on the implementation from http-cache-stream, a huge thanks to that project for sharing the fruits of that effort.
Key additions:
-
New
StreamingCacheManagertrait for streaming-aware cache backends -
HttpCacheStreamInterfacefor composable streaming middleware patterns -
StreamingManagerimplementation using file-based storage -
StreamingBodytype for handling both buffered and streaming scenarios
New Tower Integration
This release introduces a brand new tower middleware implementation:
-
Streaming response support
-
Native integration with tower's service architecture
-
HttpCacheBodyenum for handling different response body types
Check out the hyper_basic.rs and hyper_streaming.rs examples to see the tower integration with hyper in action.
Configuration Flexibility
New configuration options in HttpCacheOptions:
response_cache_mode_fnfor per-response caching mode change decisions
Testing Request
I need help testing this alpha release across different use cases:
Critical Areas
-
Streaming performance - Large file downloads and uploads
-
Memory usage - Streaming vs buffered scenarios
-
Integration compatibility - With existing reqwest and surf applications, plus new tower services
-
Cache behavior - Proper HTTP semantics compliance
-
Error handling - Network failures and cache corruption scenarios
Test Scenarios
-
Applications with large response bodies (>100MB)
-
High-throughput scenarios with many concurrent requests
-
Network-constrained environments
-
Applications using custom cache policies
-
Integration with existing middleware stacks and new tower services
How to Test
Add to your Cargo.toml:
[dependencies]
http-cache-tower = "1.0.0-alpha.1" # if using tower
http-cache-reqwest = "1.0.0-alpha.1" # if using reqwest
http-cache-surf = "1.0.0-alpha.1" # if using surf
For streaming features:
[dependencies]
http-cache-tower = { version = "1.0.0-alpha.1", features = ["streaming"] } # if using tower
http-cache-reqwest = { version = "1.0.0-alpha.1", features = ["streaming"] } # if using reqwest
http-cache-surf = { version = "1.0.0-alpha.1", features = ["streaming"] } # if using surf
Start with the basic examples (reqwest_basic.rs, surf_basic.rs, hyper_basic.rs) to get familiar with the APIs, then try the streaming examples for performance testing.
Documentation
Contact
Please report issues on the GitHub repository or discuss here in this thread. Include:
-
Rust version
-
Platform (OS/architecture)
-
Use case description
-
Code example if possible
-
Performance measurements if relevant
Thanks again for your time, I truly do appreciate any feedback you can provide on this alpha release. Your testing will help ensure the stability and performance of these new features before the 1.0.0 release.
1 post - 1 participant
🏷️ Rust_feed