pub struct RefreshCache<K, V, R> { /* private fields */ }
Expand description
A RefreshCache
provides a simple interface for caching values with a time-to-live policy
for any type that maps a key to a value asynchronously
This is a replacment for directly using LightCache
with a TtlPolicy
and calling LightCache::get_or_try_insert
everywhere
Implementations§
Auto Trait Implementations§
impl<K, V, R> Freeze for RefreshCache<K, V, R>where
R: Freeze,
impl<K, V, R> !RefUnwindSafe for RefreshCache<K, V, R>
impl<K, V, R> Send for RefreshCache<K, V, R>
impl<K, V, R> Sync for RefreshCache<K, V, R>
impl<K, V, R> Unpin for RefreshCache<K, V, R>where
R: Unpin,
impl<K, V, R> !UnwindSafe for RefreshCache<K, V, R>
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