Trait CacheInvalidation

Source
pub trait CacheInvalidation {
    // Required methods
    fn invalidate_subject_cache(&self, subject_id: &str);
    fn invalidate_role_cache(&self, role_name: &str);
    fn invalidate_resource_type_cache(&self, resource_type: &str);
    fn cleanup_expired_cache(&self, ttl_seconds: u64);
}
Expand description

Trait for components that can provide cache invalidation.

Required Methods§

Source

fn invalidate_subject_cache(&self, subject_id: &str)

Invalidate cache entries for a subject.

Source

fn invalidate_role_cache(&self, role_name: &str)

Invalidate cache entries for a role.

Source

fn invalidate_resource_type_cache(&self, resource_type: &str)

Invalidate cache entries for a resource type.

Source

fn cleanup_expired_cache(&self, ttl_seconds: u64)

Cleanup expired cache entries.

Implementors§