Thanks to visit codestin.com
Credit goes to lib.rs

Cargo Features

Moka has no features set by default.

[dependencies]
moka = { version = "0.12.15", features = ["sync", "future", "logging", "quanta", "atomic64", "unstable-debug-counters"] }
sync

Enable this feature to use moka::sync::{Cache, SegmentedCache}

Affects moka::notification, moka::ops, moka::policy

future unstable-debug-counters?

Enable this feature to use moka::future::Cache.

Enables async-lock, event-listener, and futures-util

async-lock:

Optional dependencies (future)

Affects moka::notification, moka::ops, moka::policy

logging

Enable this feature to activate optional logging from caches.
Currently cache will emit log only when it encounters a panic in user provided callback closure.

Enables log

Optional dependencies (logging)

quanta

Enable this feature to use quanta::Instant for some performance critical operations in the cache instead of std::time::Instant. As of v0.12.10, this feature will not make any noticeable performance difference, but in the future when cache metrics are added, it will be useful to have this feature enabled.

Enables quanta

Optional dependencies (quanta)

atomic64

This is an old feature and has no effect in v0.12.10 or newer. It is kept for backward compatibility and will be removed in v0.13.0.

unstable-debug-counters = future

This unstable feature adds GlobalDebugCounters::current function, which returns counters of internal object construction and destruction. It will have some performance impacts and is intended for debugging.