oxcache 0.1.2

A high-performance, production-ready Rust multi-level cache library providing L1 (Moka) and L2 (Redis) caching.
Documentation
[workspace]
members = [".", "macros"]

[package]
name = "oxcache"
version = "0.1.2"
edition = "2021"
rust-version = "1.75"
description = "A high-performance, production-ready Rust multi-level cache library providing L1 (Moka) and L2 (Redis) caching."
license = "MIT"
repository = "https://github.com/Kirky-X/oxcache"
homepage = "https://github.com/Kirky-X/oxcache"
documentation = "https://docs.rs/oxcache"
keywords = ["cache", "redis", "moka", "distributed-cache", "two-level-cache"]
categories = ["caching"]

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

[package.metadata.cargo-machete]
ignored = ["macros"]

[dependencies]
tokio = { version = "1.42", features = ["full"] }
tokio-util = "0.7"
futures = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", optional = true }
# bincode = { version = "2.0", optional = true }
flate2 = { version = "1.0", optional = true }
thiserror = "1.0"
async-trait = "0.1"
moka = { version = "0.12", features = ["future"] }
redis = { version = "0.27", features = ["tokio-comp", "cluster-async", "sentinel", "connection-manager"] }

dashmap = "6.0"
tracing = "0.1"
uuid = { version = "1.0", features = ["v4"] }
lazy_static = "1.4"
toml = "0.8"
secrecy = { version = "0.10.3", features = ["serde"] }
opentelemetry = "0.22"
opentelemetry_sdk = { version = "0.22", features = ["rt-tokio"] }
tracing-opentelemetry = "0.23"
opentelemetry-otlp = "0.15"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
mcp-sdk-rs = "0.3.4"
sea-orm = { version = "1.0.14", default-features = false, features = ["sqlx-postgres", "sqlx-mysql", "sqlx-sqlite", "runtime-tokio-rustls"] }
regex = "1.10"
chrono = { version = "0.4", features = ["serde"] }
jemalloc-ctl = { version = "0.5", optional = true }
murmur3 = "0.5"
clap = { version = "4.4", features = ["derive"] }
anyhow = "1.0"
ahash = "0.8.12"

[dev-dependencies]
tempfile = "3.8"
serial_test = "3.0"
rand = "0.8"
criterion = { version = "0.5", features = ["async_tokio"] }
ctor = "0.2"
mockall = "0.14.0"

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
overflow-checks = false

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1

[profile.dev]
debug = true

[profile.test]
opt-level = 0

[features]
default = ["full"]

full = [
    "tokio/full",
    "serde/derive",
    "serde_json",
    # "bincode",
    "flate2",
]
memory-profiling = ["jemalloc-ctl"]
macros = []

[[bench]]
name = "cache_benchmark"
harness = false

[[test]]
name = "invalidation_test"
path = "tests/integration/invalidation_test.rs"

[[test]]
name = "single_flight_test"
path = "tests/integration/single_flight_test.rs"

[[test]]
name = "wal_test"
path = "tests/integration/wal_test.rs"

[[test]]
name = "redis_test"
path = "tests/integration/redis_test.rs"

[[test]]
name = "manual_control_test"
path = "tests/integration/manual_control_test.rs"

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

[[test]]
name = "lifecycle_test"
path = "tests/integration/lifecycle_test.rs"

# [[test]]
# name = "macro_test"
# path = "tests/e2e/macro_test.rs"

[[test]]
name = "security_test"
path = "tests/integration/security_test.rs"

[[test]]
name = "version_test"
path = "tests/integration/version_test.rs"

[[test]]
name = "chaos_test"
path = "tests/integration/chaos_test.rs"



[[test]]
name = "lock_warmup_test"
path = "tests/integration/lock_warmup_test.rs"

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

[[test]]
name = "sea_orm_sqlite_tests"
path = "tests/integration/sea_orm_sqlite_tests.rs"

[[test]]
name = "sqlite_partition_tests"
path = "tests/integration/sqlite_partition_tests.rs"

[[test]]
name = "degradation_tests"
path = "tests/integration/degradation_tests.rs"