InMemoryCachedKeySet

Type Alias InMemoryCachedKeySet 

Source
pub type InMemoryCachedKeySet<S> = CachedKeySet<InMemoryKeyCache, S>;
Available on crate feature cache-inmemory only.
Expand description

Convenience type alias for a cached key set using in-memory caching.

Aliased Type§

pub struct InMemoryCachedKeySet<S> { /* private fields */ }

Implementations§

Source§

impl<S> InMemoryCachedKeySet<S>

Source

pub fn with_ttl(source: S, ttl: Duration) -> Self

Creates a new cached key source with in-memory caching and the specified TTL.

Source

pub fn with_default_ttl(source: S) -> Self

Creates a new cached key source with in-memory caching and the default TTL.

Source

pub async fn invalidate(&self)

Invalidates the cache, forcing fresh fetches on subsequent requests.

Source

pub async fn invalidate_key(&self, kid: &str)

Removes a specific key from the cache.