4 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("mini-moka", [
])?;
use opendal::Operator;
let op = Operator::via_iter("mini-moka", [
// Sets the max capacity of the cache.
//
// Refer to [`mini-moka::sync::CacheBuilder::max_capacity`](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.max_capacity)
// ("max_capacity".to_string(), "1000".to_string()),
// Sets the time to live of the cache.
//
// Refer to [`mini-moka::sync::CacheBuilder::time_to_live`](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.time_to_live)
// ("time_to_live".to_string(), "...".to_string()),
// Sets the time to idle of the cache.
//
// Refer to [`mini-moka::sync::CacheBuilder::time_to_idle`](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.time_to_idle)
// ("time_to_idle".to_string(), "...".to_string()),
// root path of this backend
// ("root".to_string(), "...".to_string()),
])?;
Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.
| Key | Type | Required | Description |
|---|---|---|---|
max_capacity | integer | no | Sets the max capacity of the cache.
Refer to [mini-moka::sync::CacheBuilder::max_capacity](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.max_capacity) |
time_to_live | string | no | Sets the time to live of the cache.
Refer to [mini-moka::sync::CacheBuilder::time_to_live](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.time_to_live) |
time_to_idle | string | no | Sets the time to idle of the cache.
Refer to [mini-moka::sync::CacheBuilder::time_to_idle](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.time_to_idle) |
root | string | no | root path of this backend |