pub struct FusionCacheOptionsBuilder { /* private fields */ }
Implementations§
Source§impl FusionCacheOptionsBuilder
impl FusionCacheOptionsBuilder
pub fn new() -> Self
Sourcepub fn with_time_to_live(self, time_to_live: Duration) -> Self
pub fn with_time_to_live(self, time_to_live: Duration) -> Self
Sourcepub fn ignore_time_to_live(self) -> Self
pub fn ignore_time_to_live(self) -> Self
Ignores the time-to-live for the cache.
Sourcepub fn with_time_to_idle(self, time_to_idle: Duration) -> Self
pub fn with_time_to_idle(self, time_to_idle: Duration) -> Self
Sourcepub fn ignore_time_to_idle(self) -> Self
pub fn ignore_time_to_idle(self) -> Self
Ignores the time-to-idle for the cache.
Sourcepub fn with_fail_safe(
self,
entry_ttl: Duration,
failsafe_cycle_ttl: Duration,
max_cycles: Option<u64>,
soft_timeout: Option<Duration>,
) -> Self
pub fn with_fail_safe( self, entry_ttl: Duration, failsafe_cycle_ttl: Duration, max_cycles: Option<u64>, soft_timeout: Option<Duration>, ) -> Self
Sets the fail-safe configuration for the cache.
§Arguments
entry_ttl
- The time-to-live for the fail-safe cache.failsafe_cycle_ttl
- The time-to-live for the fail-safe cycle.max_cycles
- The maximum number of fail-safe cycles.soft_timeout
- The soft timeout for the fail-safe cache.
Sourcepub fn skip_fail_safe_cache(self) -> Self
pub fn skip_fail_safe_cache(self) -> Self
Skips the fail-safe cache for the cache.
Sourcepub fn with_hard_timeout(self, hard_timeout: Duration) -> Self
pub fn with_hard_timeout(self, hard_timeout: Duration) -> Self
Sourcepub fn skip_hard_timeout(self) -> Self
pub fn skip_hard_timeout(self) -> Self
Skips the hard timeout for the cache.
Sourcepub fn skip_distributed_cache(self) -> Self
pub fn skip_distributed_cache(self) -> Self
Skips the distributed cache for the cache.
pub fn build(self) -> FusionCacheOptions
Auto Trait Implementations§
impl Freeze for FusionCacheOptionsBuilder
impl RefUnwindSafe for FusionCacheOptionsBuilder
impl Send for FusionCacheOptionsBuilder
impl Sync for FusionCacheOptionsBuilder
impl Unpin for FusionCacheOptionsBuilder
impl UnwindSafe for FusionCacheOptionsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more