Trait pingora_cache::key::CacheHashKey
source · pub trait CacheHashKey {
// Required methods
fn primary_bin(&self) -> HashBinary;
fn variance_bin(&self) -> Option<HashBinary>;
fn user_tag(&self) -> &str;
// Provided methods
fn combined_bin(&self) -> HashBinary { ... }
fn primary(&self) -> String { ... }
fn variance(&self) -> Option<String> { ... }
fn combined(&self) -> String { ... }
}Expand description
The trait for cache key
Required Methods§
sourcefn primary_bin(&self) -> HashBinary
fn primary_bin(&self) -> HashBinary
Return the hash of the cache key
sourcefn variance_bin(&self) -> Option<HashBinary>
fn variance_bin(&self) -> Option<HashBinary>
Return the variance hash of the cache key.
None if no variance.
Provided Methods§
sourcefn combined_bin(&self) -> HashBinary
fn combined_bin(&self) -> HashBinary
Return the hash including both primary and variance keys
sourcefn primary(&self) -> String
fn primary(&self) -> String
The hex string of Self::primary_bin()
sourcefn variance(&self) -> Option<String>
fn variance(&self) -> Option<String>
The hex string of Self::variance_bin()
sourcefn combined(&self) -> String
fn combined(&self) -> String
The hex string of Self::combined_bin()