fncache 0.1.1

A zero-boilerplate Rust library for function-level caching with pluggable backends
Documentation
[[bench]]
harness = false
name = "cache_benchmarks"
path = "benches/cache_benchmarks.rs"

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

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

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

[dependencies.dashmap]
optional = true
version = "5.5.0"

[dependencies.fncache-macros]
version = "0.1.1"

[dependencies.futures]
version = "0.3.28"

[dependencies.js-sys]
optional = true
version = "0.3"

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

[dependencies.redis]
features = ["tokio-comp"]
optional = true
version = "0.23.3"

[dependencies.rocksdb]
optional = true
version = "0.21.0"

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

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

[dependencies.tempfile]
optional = true
version = "3.8.0"

[dependencies.thiserror]
version = "1.0.50"

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

[dependencies.wasm-bindgen]
optional = true
version = "0.2"

[dependencies.web-sys]
features = ["Storage", "Window", "console"]
optional = true
version = "0.3"

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

[dev-dependencies.criterion]
features = ["html_reports", "async_futures"]
version = "0.5"

[dev-dependencies.futures]
version = "0.3.28"

[dev-dependencies.rand]
version = "0.8"

[dev-dependencies.serde]
features = ["derive"]
version = "1.0.188"

[dev-dependencies.serial_test]
version = "2.0.0"

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

[dev-dependencies.wasm-bindgen-futures]
version = "0.4"

[dev-dependencies.wasm-bindgen-test]
version = "0.3"

[[example]]
name = "backend_file"
path = "examples/backend_file.rs"
required-features = ["file-backend"]

[[example]]
name = "backend_memory"
path = "examples/backend_memory.rs"
required-features = ["memory"]

[[example]]
name = "cache_invalidation"
path = "examples/cache_invalidation.rs"
required-features = ["memory"]

[[example]]
name = "error_handling"
path = "examples/error_handling.rs"
required-features = ["memory"]

[[example]]
name = "getting_started"
path = "examples/getting_started.rs"
required-features = ["memory"]

[[example]]
name = "key_derivation"
path = "examples/key_derivation.rs"
required-features = ["memory", "compile-time-keys"]

[[example]]
name = "sync_vs_async_functions"
path = "examples/sync_vs_async_functions.rs"
required-features = ["memory"]

[features]
bincode = ["dep:bincode"]
compile-time-keys = []
default = ["memory", "serde", "bincode"]
file-backend = ["dep:serde", "bincode", "tempfile"]
memory = ["dashmap", "tokio"]
metrics = ["dep:metrics"]
redis-backend = ["dep:redis", "serde_json"]
rocksdb-backend = ["dep:rocksdb", "bincode"]
serde = ["dep:serde"]
test-utils = []
wasm = ["wasm-bindgen", "web-sys", "js-sys", "memory"]

[lib]
name = "fncache"
path = "src/lib.rs"
proc-macro = false

[package]
authors = ["Lokesh Kumar <lkumar94@gmail.com>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
categories = ["caching", "asynchronous", "web-programming"]
description = "A zero-boilerplate Rust library for function-level caching with pluggable backends"
edition = "2021"
keywords = ["cache", "memoization", "performance", "macro"]
license = "MIT"
name = "fncache"
readme = "README.md"
repository = "https://github.com/kumarlokesh/fncache"
version = "0.1.1"

[profile.bench]
debug = 2
opt-level = 3

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

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

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

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

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

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

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