Cargo Features

[dependencies]
http-cache = { version = "1.0.0-alpha.4", default-features = false, features = ["http-headers-compat", "url-standard", "url-ada", "manager-cacache", "manager-moka", "manager-foyer", "streaming", "with-http-types", "rate-limiting", "postcard", "bincode", "manager-cacache-bincode", "manager-moka-bincode", "serde_json", "blake3", "lru", "dashmap", "smol", "tempfile", "async-lock", "async-compat"] }
default = manager-cacache, url-standard

These default features are set whenever http-cache is added without default-features = false somewhere in the dependency tree.

http-headers-compat
url-standard default

Enables url

url-ada

Enables ada-url

manager-cacache default = cacache, postcard, tokio

Affects managers::cacache

manager-moka = moka, postcard

Affects managers::moka

manager-foyer = foyer, postcard, tokio

Affects managers::foyer

streaming = cacache, cfg-if, futures-util, moka, postcard, rand, tokio

Affects http-cache::StreamingCacheManager.body_to_bytes_stream, managers::streaming_cache

with-http-types = http-types
rate-limiting = governor

Affects http-cache::rate_limiting, http-cache::HttpCacheOptions.rate_limiter, rate_limiting::CacheAwareRateLimiter, rate_limiting::DomainRateLimiter, rate_limiting::DirectRateLimiter

postcard manager-cacache manager-foyer? manager-moka? streaming?

Serialization format features (for crates that need to specify which to use)

Enables postcard

bincode manager-cacache-bincode? manager-moka-bincode?

Enables bincode ^1.3.3

manager-cacache-bincode = bincode, cacache, tokio

Legacy bincode features (deprecated - will be removed in next major version)
bincode is unmaintained per RUSTSEC-2025-0141

Affects managers::cacache

manager-moka-bincode = bincode, moka

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

cacache manager-cacache manager-cacache-bincode? streaming?
foyer manager-foyer?
futures-util streaming?
http-types with-http-types?
moka manager-moka? manager-moka-bincode? streaming?
serde_json implicit feature

Enables serde_json

serde_json:

A JSON serialization file format

blake3 implicit feature

Enables blake3

blake3:

the BLAKE3 hash function

lru implicit feature

Enables lru

lru:

A LRU cache implementation

dashmap implicit feature

Enables dashmap

dashmap:

Blazing fast concurrent HashMap for Rust

smol implicit feature

Enables smol

smol:

A small and fast async runtime

tokio manager-cacache manager-cacache-bincode? manager-foyer? streaming?
cfg-if streaming?
governor rate-limiting?
tempfile implicit feature

Enables tempfile

tempfile:

A library for managing temporary files and directories

async-lock implicit feature

Enables async-lock

async-lock:

Async synchronization primitives

async-compat implicit feature

Enables async-compat

async-compat:

Compatibility adapter between tokio and futures

rand streaming?

Enables rand ^0.9.2