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>
impl<S> InMemoryCachedKeySet<S>
Sourcepub fn with_ttl(source: S, ttl: Duration) -> Self
pub fn with_ttl(source: S, ttl: Duration) -> Self
Creates a new cached key source with in-memory caching and the specified TTL.
Sourcepub fn with_default_ttl(source: S) -> Self
pub fn with_default_ttl(source: S) -> Self
Creates a new cached key source with in-memory caching and the default TTL.
Sourcepub async fn invalidate(&self)
pub async fn invalidate(&self)
Invalidates the cache, forcing fresh fetches on subsequent requests.
Sourcepub async fn invalidate_key(&self, kid: &str)
pub async fn invalidate_key(&self, kid: &str)
Removes a specific key from the cache.