amalgam-cache 0.2.0

A robust, multi-level, fail-safe cache — an idiomatic Rust port of .NET's FusionCache (cache-stampede protection, fail-safe, soft/hard timeouts, eager refresh, L1+L2, backplane, tagging).
Documentation
# 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 = "2024"
rust-version = "1.88"
name = "amalgam-cache"
version = "0.2.0"
build = false
exclude = [
    "/assets/*.png",
    "/.github",
    "/docker-compose.yml",
    "/prometheus.yml",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A robust, multi-level, fail-safe cache — an idiomatic Rust port of .NET's FusionCache (cache-stampede protection, fail-safe, soft/hard timeouts, eager refresh, L1+L2, backplane, tagging)."
homepage = "https://github.com/ZoonTronLabs/amalgam"
documentation = "https://docs.rs/amalgam-cache"
readme = "README.md"
keywords = [
    "cache",
    "caching",
    "fusioncache",
    "stampede",
    "failsafe",
]
categories = [
    "caching",
    "asynchronous",
]
license = "MIT"
repository = "https://github.com/ZoonTronLabs/amalgam"

[features]
default = []
full = [
    "redis",
    "messagepack",
    "postcard",
    "metrics",
    "opentelemetry",
]
messagepack = ["dep:rmp-serde"]
metrics = ["dep:metrics"]
opentelemetry = [
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:opentelemetry-otlp",
    "dep:tracing-opentelemetry",
    "dep:tracing-subscriber",
]
postcard = ["dep:postcard"]
redis = ["dep:redis"]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.dashmap]
version = "6.2.1"

[dependencies.fastrand]
version = "2.4.1"

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

[dependencies.moka]
version = "0.12.15"
features = ["future"]

[dependencies.opentelemetry]
version = "0.32"
optional = true

[dependencies.opentelemetry-otlp]
version = "0.32"
features = [
    "trace",
    "grpc-tonic",
]
optional = true
default-features = false

[dependencies.opentelemetry_sdk]
version = "0.32"
features = ["rt-tokio"]
optional = true

[dependencies.postcard]
version = "1.1.3"
features = ["use-std"]
optional = true

[dependencies.redis]
version = "1.2.4"
features = [
    "tokio-comp",
    "connection-manager",
]
optional = true
default-features = false

[dependencies.rmp-serde]
version = "1.3.1"
optional = true

[dependencies.serde]
version = "1.0.228"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.150"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tokio]
version = "1.52.3"
features = [
    "rt-multi-thread",
    "macros",
    "sync",
    "time",
]

[dependencies.tracing]
version = "0.1.44"

[dependencies.tracing-opentelemetry]
version = "0.33"
optional = true

[dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "fmt",
    "std",
]
optional = true
default-features = false

[dev-dependencies.metrics-exporter-prometheus]
version = "0.18.3"