pub struct TaggedCache<C: CacheStore> { /* private fields */ }Expand description
Cache with tag-based invalidation support
Implementations§
Source§impl<C: CacheStore> TaggedCache<C>
impl<C: CacheStore> TaggedCache<C>
Sourcepub async fn delete(&self, key: &str) -> CacheResult<()>
pub async fn delete(&self, key: &str) -> CacheResult<()>
Delete a specific key
Sourcepub async fn invalidate_tag(&self, tag: &str) -> CacheResult<()>
pub async fn invalidate_tag(&self, tag: &str) -> CacheResult<()>
Sourcepub async fn get_keys_by_tag(&self, tag: &str) -> Vec<String>
pub async fn get_keys_by_tag(&self, tag: &str) -> Vec<String>
Get all keys with a specific tag
Get all tags for a specific key
Get all registered tags
Trait Implementations§
Source§impl<C: CacheStore> Clone for TaggedCache<C>
impl<C: CacheStore> Clone for TaggedCache<C>
Auto Trait Implementations§
impl<C> Freeze for TaggedCache<C>
impl<C> !RefUnwindSafe for TaggedCache<C>
impl<C> Send for TaggedCache<C>
impl<C> Sync for TaggedCache<C>
impl<C> Unpin for TaggedCache<C>
impl<C> !UnwindSafe for TaggedCache<C>
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