[package]
name = "http-cache"
version = "0.21.0"
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.82.0"

[dependencies]
async-trait = "0.1.85"
bincode = { version = "1.3.3", optional = true }
cacache = { version = "13.1.0", default-features = false, features = ["mmap"], optional = true }
http = "1.2.0"
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 }
serde = { version = "1.0.217", features = ["derive"] }
url = { version = "2.5.4", features = ["serde"] }

[dev-dependencies]
async-attributes = "1.1.2"
async-std = { version = "1.13.0" }
http-cache-semantics = "2.1.0"
tokio = { version = "1.43.0", features = [ "macros", "rt", "rt-multi-thread" ] }

[features]
default = ["manager-cacache", "cacache-async-std"]
manager-cacache = ["cacache", "bincode"]
cacache-tokio = ["cacache/tokio-runtime"]
cacache-async-std = ["cacache/async-std"]
manager-moka = ["moka", "bincode"]
with-http-types = ["http-types"]

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