[package]
name = "moka"
version = "0.12.8"
edition = "2021"
rust-version = "1.65"
description = "A fast and concurrent cache library inspired by Java Caffeine"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/moka/"
repository = "https://github.com/moka-rs/moka"
keywords = ["cache", "concurrent"]
categories = ["caching", "concurrency"]
readme = "README.md"
exclude = [".circleci", ".cirrus.yml", ".devcontainer", ".github", ".gitpod.yml", ".vscode"]
build = "build.rs"
[features]
default = ["atomic64", "quanta"]
sync = []
future = ["async-lock", "async-trait", "event-listener", "futures-util"]
logging = ["log"]
atomic64 = []
unstable-debug-counters = ["future"]
[dependencies]
crossbeam-channel = "0.5.5"
crossbeam-epoch = "0.9.9"
crossbeam-utils = "0.8"
once_cell = "1.7"
parking_lot = "0.12"
smallvec = "1.8"
tagptr = "0.2"
thiserror = "1.0"
uuid = { version = "1.1", features = ["v4"] }
triomphe = { version = ">=0.1.3, <0.1.12", default-features = false }
quanta = { version = "0.12.2", optional = true }
async-lock = { version = "3.3", optional = true }
async-trait = { version = "0.1.58", optional = true }
event-listener = { version = "5.3", optional = true }
futures-util = { version = "0.3.17", optional = true }
log = { version = "0.4", optional = true }
[dev-dependencies]
actix-rt = "2.8"
ahash = "0.8.3"
anyhow = "1.0.19"
async-std = { version = "1.12", features = ["attributes"] }
env_logger = "0.10.0"
getrandom = "0.2"
paste = "1.0.9"
reqwest = { version = "0.11.11", default-features = false, features = ["rustls-tls"] }
tokio = { version = "1.19", features = ["fs", "io-util", "macros", "rt-multi-thread", "sync", "time" ] }
[target.'cfg(trybuild)'.dev-dependencies]
trybuild = "1.0"
[target.'cfg(rustver)'.build-dependencies]
rustc_version = "0.4.0"
[package.metadata.docs.rs]
features = ["future", "sync"]
rustdoc-args = ["--cfg", "docsrs"]
[[example]]
name = "append_value_async"
required-features = ["future"]
[[example]]
name = "append_value_sync"
required-features = ["sync"]
[[example]]
name = "basics_async"
required-features = ["future"]
[[example]]
name = "basics_sync"
required-features = ["sync"]
[[example]]
name = "bounded_counter_async"
required-features = ["future"]
[[example]]
name = "bounded_counter_sync"
required-features = ["sync"]
[[example]]
name = "cascading_drop_async"
required-features = ["future"]
[[example]]
name = "counter_async"
required-features = ["future"]
[[example]]
name = "counter_sync"
required-features = ["sync"]
[[example]]
name = "eviction_listener_sync"
required-features = ["sync"]
[[example]]
name = "reinsert_expired_entries_sync"
required-features = ["sync"]
[[example]]
name = "size_aware_eviction_sync"
required-features = ["sync"]
[[example]]
name = "try_append_value_async"
required-features = ["future"]
[[example]]
name = "try_append_value_sync"
required-features = ["sync"]