pub enum CacheEventKind {
Show 14 variants
Hit,
Miss,
SingleFlightJoined,
LoadStarted,
LoadCompleted,
LoadFailed,
Stored,
Removed,
KeyInvalidated,
TagInvalidated,
Flushed,
StaleLoadDiscarded,
Expired,
Evicted,
}Expand description
Kind of cache event emitted by a HydraCache runtime.
Access and loader events are intentionally separate from mutation events so applications can keep high-volume hit/miss reporting disabled until needed.
Variants§
Hit
A lookup returned a cached value.
Miss
A lookup did not find a usable cached value.
SingleFlightJoined
A caller joined an already running single-flight load.
LoadStarted
The cache owner started a loader for a missing key.
LoadCompleted
A loader completed and its result was accepted into the cache.
LoadFailed
A loader returned an error or failed to encode the loaded value.
Stored
A value was stored.
Removed
A key was explicitly removed.
KeyInvalidated
A key was explicitly invalidated.
TagInvalidated
A tag was invalidated.
Flushed
The cache was flushed.
StaleLoadDiscarded
A loader result was discarded because an invalidation made it stale.
Expired
An entry expired and was removed during cache access.
Evicted
An entry was evicted by the backend.
Implementations§
Trait Implementations§
Source§impl Clone for CacheEventKind
impl Clone for CacheEventKind
Source§fn clone(&self) -> CacheEventKind
fn clone(&self) -> CacheEventKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CacheEventKind
Source§impl Debug for CacheEventKind
impl Debug for CacheEventKind
impl Eq for CacheEventKind
Source§impl Hash for CacheEventKind
impl Hash for CacheEventKind
Source§impl PartialEq for CacheEventKind
impl PartialEq for CacheEventKind
Source§fn eq(&self, other: &CacheEventKind) -> bool
fn eq(&self, other: &CacheEventKind) -> bool
self and other values to be equal, and is used by ==.