Skip to main content

InvalidationManager

Trait InvalidationManager 

Source
pub trait InvalidationManager: Send + Sync {
    // Required methods
    fn invalidate_pattern<'life0, 'async_trait>(
        &'life0 self,
        pattern: PatternStrategy,
    ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn invalidate_tags<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tags: &'life1 [&'life2 str],
    ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn invalidate_expired<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn invalidate_dependencies<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        keys: &'life1 [&'life2 str],
    ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_tracked_keys<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register_entry<'life0, 'async_trait>(
        &'life0 self,
        entry: InvalidatableEntry,
    ) -> Pin<Box<dyn Future<Output = CacheResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unregister_entry<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = CacheResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Advanced invalidation manager

Required Methods§

Source

fn invalidate_pattern<'life0, 'async_trait>( &'life0 self, pattern: PatternStrategy, ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Invalidate cache entries matching a pattern

Source

fn invalidate_tags<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tags: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Invalidate cache entries by tags

Source

fn invalidate_expired<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Invalidate expired entries based on time policies

Source

fn invalidate_dependencies<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, keys: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Invalidate entries dependent on given keys

Source

fn get_tracked_keys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CacheResult<Vec<CacheKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all keys tracked by this manager

Source

fn register_entry<'life0, 'async_trait>( &'life0 self, entry: InvalidatableEntry, ) -> Pin<Box<dyn Future<Output = CacheResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Register a cache entry for invalidation tracking

Source

fn unregister_entry<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = CacheResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Unregister a cache entry

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§