CacheInvalidationHandler

Trait CacheInvalidationHandler 

Source
pub trait CacheInvalidationHandler {
    // Required methods
    fn invalidate(&self, event: &InvalidationEvent) -> Result<()>;
    fn cache_type(&self) -> &str;
    fn can_handle(&self, event: &InvalidationEvent) -> bool;
}
Expand description

Cache invalidation handler trait

Required Methods§

Source

fn invalidate(&self, event: &InvalidationEvent) -> Result<()>

Handle cache invalidation

§Errors

This function will return an error if the invalidation fails

Source

fn cache_type(&self) -> &str

Get cache type name

Source

fn can_handle(&self, event: &InvalidationEvent) -> bool

Check if this handler can handle the event

Implementors§