Skip to main content

ClientMetadataCache

Trait ClientMetadataCache 

Source
pub trait ClientMetadataCache: Send + Sync {
    // Required methods
    fn get(&self, client_id: &str) -> Option<CachedClientMetadata>;
    fn put(&self, client_id: &str, entry: CachedClientMetadata);
}
Expand description

Where fetched client metadata is cached, keyed by client_id.

A cache hit still names the document by its ClientKey, which is what plan/app-allowlist.md’s admission check keys its list on — the cache is keyed by URL because that is what a client presents, and it hands back the content key alongside the document so a caller never has to choose which one to trust.

Required Methods§

Source

fn get(&self, client_id: &str) -> Option<CachedClientMetadata>

A fresh cached entry for client_id, if one exists and has not expired.

Source

fn put(&self, client_id: &str, entry: CachedClientMetadata)

Stores (or replaces) the entry for client_id.

Implementors§