http-cache 1.0.0-alpha.4

An HTTP caching middleware
Documentation
[package]
name = "http-cache"
version = "1.0.0-alpha.4"
description = "An HTTP caching middleware"
authors = ["Christian Haynes <06chaynes@gmail.com>", "Kat Marchán <kzm@zkat.tech>"]
repository = "https://github.com/06chaynes/http-cache"
homepage = "https://http-cache.rs"
license = "MIT OR Apache-2.0"
readme = "README.md"
keywords = ["cache", "http", "middleware"]
categories = [
    "caching",
    "web-programming::http-client"
]
edition = "2021"
rust-version = "1.88.0"

[dependencies]
async-trait = "0.1.85"
bincode = { version = "1.3.3", optional = true }
bytes = "1.8.0"
cacache = { version = "13.1.0", default-features = false, features = ["tokio-runtime", "mmap"], optional = true }
foyer = { version = "0.22.3", optional = true }
futures = "0.3.31"
futures-util = { version = "0.3.31", optional = true }
hex = "0.4.3"
log = "0.4.22"
http = "1.2.0"
http-body = "1.0.1"
http-body-util = "0.1.2"
http-cache-semantics = "2.1.0"
http-types = { version = "2.12.0", default-features = false, optional = true }
httpdate = "1.0.3"
moka = { version = "0.12.10", features = ["future"], optional = true }
pin-project-lite = "0.2"
postcard = { version = "1.1", default-features = false, features = ["alloc"], optional = true }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = { version = "1.0", optional = true }
blake3 = { version = "1.5.0", optional = true }
lru = { version = "0.16.0", optional = true }
dashmap = { version = "6.1.0", optional = true }
smol = { version = "2.0.2", optional = true }
tokio = { version = "1.44.0", features = ["fs", "io-util", "sync"], optional = true }
url = { version = "2.5.4", features = ["serde"], optional = true }
ada-url = { version = "3", features = ["serde"], optional = true }
cfg-if = { version = "1.0", optional = true }
governor = { version = "0.10.1", optional = true }
tempfile = { version = "3.13.0", optional = true }
async-lock = { version = "3.4.0", optional = true }
async-compat = { version = "0.2", optional = true }
rand = { version = "0.9.2", optional = true }

[dev-dependencies]
smol = "2.0.2"
http-cache-semantics = "2.1.0"
tokio = { version = "1.43.0", features = [ "macros", "rt", "rt-multi-thread" ] }
tempfile = "3.13.0"
macro_rules_attribute = "0.2.0"
smol-macros = "0.1.1"

[features]
default = ["manager-cacache", "url-standard"]
http-headers-compat = []
url-standard = ["dep:url"]
url-ada = ["dep:ada-url"]
manager-cacache = ["cacache", "postcard", "tokio"]
manager-moka = ["moka", "postcard"]
manager-foyer = ["foyer", "postcard", "tokio"]
streaming = [
    "cacache",
    "moka",
    "postcard",
    "tokio",
    "futures-util",
    "cfg-if",
    "rand",
]
with-http-types = ["http-types"]
rate-limiting = ["governor"]

# Serialization format features (for crates that need to specify which to use)
postcard = ["dep:postcard"]
bincode = ["dep:bincode"]

# Legacy bincode features (deprecated - will be removed in next major version)
# bincode is unmaintained per RUSTSEC-2025-0141
manager-cacache-bincode = ["cacache", "bincode", "tokio"]
manager-moka-bincode = ["moka", "bincode"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]