fibre_cache 0.4.7

Best in-class comprehensive, most flexible, high-performance, concurrent multi-mode sync/async caching library for Rust. It provides a rich, ergonomic API including a runtime-agnostic CacheLoader, an atomic `entry` API, and a wide choice of modern cache policies like W-TinyLFU, SIEVE, ARC, LRU, Clock, SLRU, Random.
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"
name = "fibre_cache"
version = "0.4.7"
authors = ["Excerion Sun <dev@excsn.com>"]
build = false
exclude = ["/docs/"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Best in-class comprehensive, most flexible, high-performance, concurrent multi-mode sync/async caching library for Rust. It provides a rich, ergonomic API including a runtime-agnostic CacheLoader, an atomic `entry` API, and a wide choice of modern cache policies like W-TinyLFU, SIEVE, ARC, LRU, Clock, SLRU, Random."
readme = "README.md"
keywords = [
    "cache",
    "caching",
    "tinylfu",
    "lfu",
    "concurrent",
]
categories = [
    "caching",
    "concurrency",
    "asynchronous",
    "data-structures",
    "memory-management",
]
license = "MPL-2.0"
repository = "https://github.com/excsn/fibre"
resolver = "2"

[features]
bulk = ["dep:rayon"]
default = [
    "serde",
    "random",
    "bulk",
    "tokio",
]
full = [
    "serde",
    "random",
    "bulk",
    "tokio",
    "rapidhash",
]
random = []
rapidhash = ["dep:rapidhash"]
serde = ["dep:serde"]
tokio = ["dep:tokio"]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.ahash]
version = "^0.8"

[dependencies.crossbeam-utils]
version = "^0.8"

[dependencies.equivalent]
version = "^1"

[dependencies.fibre]
version = "^0.5"

[dependencies.futures-util]
version = "^0.3"

[dependencies.generational-arena]
version = "^0.2"

[dependencies.num_cpus]
version = "^1"

[dependencies.once_cell]
version = "^1.17"

[dependencies.parking_lot]
version = "^0.12"

[dependencies.rand]
version = "^0.9"

[dependencies.rapidhash]
version = "^1.4"
optional = true

[dependencies.rayon]
version = "1.8"
optional = true

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

[dependencies.tokio]
version = "^1"
features = [
    "rt",
    "rt-multi-thread",
]
optional = true

[dev-dependencies.bench_matrix]
version = "0"

[dev-dependencies.bincode]
version = "1.3"

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

[dev-dependencies.futures-executor]
version = "^0.3"

[dev-dependencies.rand_distr]
version = "^0.5"

[dev-dependencies.rand_pcg]
version = "^0.9"

[dev-dependencies.tokio]
version = "^1"
features = [
    "macros",
    "sync",
    "time",
]

[profile.dev]
opt-level = 1
debug = 2