http_cache_stream/lib.rs
1//! An implementation of an HTTP response cache that uses
2//! `http-cache-semantics`.
3//!
4//! Inspired by the `http-cache` crate.
5//!
6//! This crate's implementation differs significantly from `http-cache` in the
7//! following ways:
8//!
9//! * Response bodies are not fully read into memory.
10//! * Response bodies may be linked directly from cache storage.
11//! * Uses its own lightweight storage implementation (instead of `cacache`), by
12//! default.
13//! * This library is not nearly as customizable as `http-cache`.
14//!
15//! By default, this crate uses `tokio` as its async runtime.
16//!
17//! Enable the `smol` feature for using the `smol` runtime instead.
18
19#![warn(missing_docs)]
20#![warn(rust_2018_idioms)]
21#![warn(rust_2021_compatibility)]
22#![warn(clippy::missing_docs_in_private_items)]
23#![warn(rustdoc::broken_intra_doc_links)]
24
25mod body;
26mod cache;
27pub(crate) mod runtime;
28pub mod storage;
29
30pub use body::*;
31pub use cache::*;
32// Re-export the http crate.
33pub use http;
34// Re-export the http-body crate.
35pub use http_body;
36// Re-export the semantics crate
37pub use http_cache_semantics as semantics;