pub struct Moka { /* private fields */ }
Expand description
moka backend support.
Capabilities
This service can be used to:
- read
- write
-
list -
scan -
presign - blocking
Implementations§
source§impl MokaBuilder
impl MokaBuilder
sourcepub fn max_capacity(&mut self, v: u64) -> &mut Self
pub fn max_capacity(&mut self, v: u64) -> &mut Self
Sets the max capacity of the cache.
sourcepub fn time_to_live(&mut self, v: Duration) -> &mut Self
pub fn time_to_live(&mut self, v: Duration) -> &mut Self
Sets the time to live of the cache.
sourcepub fn time_to_idle(&mut self, v: Duration) -> &mut Self
pub fn time_to_idle(&mut self, v: Duration) -> &mut Self
Sets the time to idle of the cache.
sourcepub fn segments(&mut self, v: usize) -> &mut Self
pub fn segments(&mut self, v: usize) -> &mut Self
Sets the segments number of the cache.
Refer to moka::sync::CacheBuilder::segments
sourcepub fn thread_pool_enabled(&mut self, v: bool) -> &mut Self
pub fn thread_pool_enabled(&mut self, v: bool) -> &mut Self
Decides whether to enable thread pool of the cache.
Trait Implementations§
source§impl Builder for MokaBuilder
impl Builder for MokaBuilder
source§impl Debug for MokaBuilder
impl Debug for MokaBuilder
source§impl Default for MokaBuilder
impl Default for MokaBuilder
source§fn default() -> MokaBuilder
fn default() -> MokaBuilder
Returns the “default value” for a type. Read more