# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.75.0"
name = "tower-http-cache"
version = "0.5.0"
authors = ["Daniel Curtis <drc@danielryancurtis.com>"]
build = false
exclude = [
    "._*",
    "**/.DS_Store",
    ".cursor/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Tower-compatible caching layer with pluggable backends (in-memory, Redis, and more)"
documentation = "https://docs.rs/tower-http-cache"
readme = "README.md"
keywords = [
    "tower",
    "cache",
    "middleware",
    "http",
]
categories = [
    "web-programming",
    "caching",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/sadco-io/tower-http-cache"

[features]
admin-api = [
    "dep:axum",
    "dep:governor",
]
compression = ["dep:flate2"]
default = [
    "in-memory",
    "serde",
]
in-memory = ["moka"]
memcached-backend = [
    "async-memcached",
    "serde",
    "dep:bincode",
    "dep:bb8",
]
metrics = ["dep:metrics"]
redis-backend = [
    "redis",
    "tokio-util",
    "serde",
    "dep:bincode",
]
serde = [
    "dep:serde",
    "dep:serde_json",
    "dep:bincode",
]
tracing = ["dep:tracing"]

[lib]
name = "tower_http_cache"
path = "src/lib.rs"

[[example]]
name = "axum_redis"
path = "examples/axum_redis.rs"

[[example]]
name = "chunk_cache_demo"
path = "examples/chunk_cache_demo.rs"

[[example]]
name = "memcached_production"
path = "examples/memcached_production.rs"

[[example]]
name = "redis_smoke"
path = "examples/redis_smoke.rs"

[[example]]
name = "v0_3_features"
path = "examples/v0_3_features.rs"

[[test]]
name = "auto_refresh"
path = "tests/auto_refresh.rs"

[[test]]
name = "cache_stale"
path = "tests/cache_stale.rs"

[[test]]
name = "integration_cache"
path = "tests/integration_cache.rs"

[[test]]
name = "redis_example"
path = "tests/redis_example.rs"

[[test]]
name = "streaming"
path = "tests/streaming.rs"

[[bench]]
name = "cache_benchmarks"
path = "benches/cache_benchmarks.rs"
harness = false

[dependencies.async-memcached]
version = "0.5"
optional = true

[dependencies.async-trait]
version = "0.1"

[dependencies.axum]
version = "0.8"
optional = true

[dependencies.bb8]
version = "0.8"
optional = true

[dependencies.bincode]
version = "1.3.3"
optional = true

[dependencies.bytes]
version = "1.7"

[dependencies.chrono]
version = "0.4"

[dependencies.dashmap]
version = "5.5"

[dependencies.flate2]
version = "1.0"
features = ["rust_backend"]
optional = true
default-features = false

[dependencies.futures-util]
version = "0.3"
features = ["alloc"]
default-features = false

[dependencies.governor]
version = "0.6"
optional = true

[dependencies.hex]
version = "0.4"

[dependencies.http]
version = "1.3"
default-features = false

[dependencies.http-body]
version = "1.0"

[dependencies.http-body-util]
version = "0.1"

[dependencies.metrics]
version = "0.24"
optional = true

[dependencies.moka]
version = "0.12"
features = ["future"]
optional = true

[dependencies.pin-project-lite]
version = "0.2"

[dependencies.redis]
version = "0.32.7"
features = [
    "aio",
    "tokio-comp",
    "connection-manager",
]
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1.0"
optional = true

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1.40"
features = [
    "sync",
    "rt",
    "time",
    "macros",
]

[dependencies.tokio-util]
version = "0.7"
optional = true

[dependencies.tower]
version = "0.5"
features = ["util"]
default-features = false

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.uuid]
version = "1.0"
features = [
    "v4",
    "serde",
]

[dev-dependencies.axum]
version = "0.8.6"

[dev-dependencies.criterion]
version = "0.7"
features = ["html_reports"]

[dev-dependencies.http-body-util]
version = "0.1"

[dev-dependencies.redis]
version = "0.32.7"
features = [
    "aio",
    "tokio-comp",
    "connection-manager",
]

[dev-dependencies.tokio]
version = "1.40"
features = ["full"]

[dev-dependencies.tower]
version = "0.5"
features = ["util"]

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
    "fmt",
    "env-filter",
]
