Skip to main content

PrincipalCache

Trait PrincipalCache 

Source
pub trait PrincipalCache {
    // Required methods
    fn get(&self, key: &CacheKey) -> Option<CachedPrincipal>;
    fn insert(&self, key: CacheKey, entry: CachedPrincipal);
}
Expand description

Trusted optimization only; misses and failures must return None.

Preserve entries as supplied and bound memory. No invalidation guarantee is required: expiry and the current validation hook are checked on every hit. This interface does not provide an atomic replay store. Concurrent cold misses may independently decrypt.

Required Methods§

Source

fn get(&self, key: &CacheKey) -> Option<CachedPrincipal>

Source

fn insert(&self, key: CacheKey, entry: CachedPrincipal)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§