#[non_exhaustive]pub enum CacheEvent {
Show 20 variants
Hit {
key: Arc<str>,
stale: bool,
},
Miss {
key: Arc<str>,
},
Set {
key: Arc<str>,
},
Remove {
key: Arc<str>,
},
Expire {
key: Arc<str>,
},
FactorySuccess {
key: Arc<str>,
},
FactoryError {
key: Arc<str>,
message: String,
},
FactorySyntheticTimeout {
key: Arc<str>,
},
FailSafeActivate {
key: Arc<str>,
},
EagerRefresh {
key: Arc<str>,
},
BackgroundFactorySuccess {
key: Arc<str>,
},
BackgroundFactoryError {
key: Arc<str>,
message: String,
},
RemoveByTag {
tag: String,
},
Clear,
Eviction {
key: Arc<str>,
},
CircuitBreakerChange {
component: CircuitComponent,
closed: bool,
},
SerializationError {
key: Arc<str>,
message: String,
},
DeserializationError {
key: Arc<str>,
message: String,
},
MessagePublished {
key: Arc<str>,
},
MessageReceived {
key: Arc<str>,
},
}Expand description
An observable cache event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Hit
A value was served. stale is true when it came from a fail-safe /
stale fallback rather than a fresh entry.
Miss
Nothing servable was found for the key.
Set
A value was written to the cache.
Remove
A key was removed.
Expire
A key was logically expired.
FactorySuccess
The factory completed successfully on the foreground path.
FactoryError
The factory returned an error.
FactorySyntheticTimeout
The factory exceeded a (soft or hard) timeout.
FailSafeActivate
A stale value was served because the factory failed or timed out.
EagerRefresh
A proactive background refresh was started.
BackgroundFactorySuccess
A timed-out factory later completed successfully in the background.
BackgroundFactoryError
A timed-out factory later failed in the background.
RemoveByTag
All entries carrying a tag were invalidated.
Clear
The whole cache was cleared.
Eviction
An entry was evicted from L1 by the backend’s size/expiry policy.
CircuitBreakerChange
A distributed-cache or backplane circuit breaker opened or closed.
Fields
component: CircuitComponentWhich component the breaker guards.
SerializationError
A value failed to serialize for L2.
DeserializationError
A value failed to deserialize from L2.
MessagePublished
A backplane notification was published to peers.
MessageReceived
A backplane notification was received from a peer.
Trait Implementations§
Source§impl Clone for CacheEvent
impl Clone for CacheEvent
Source§fn clone(&self) -> CacheEvent
fn clone(&self) -> CacheEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheEvent
impl Debug for CacheEvent
impl Eq for CacheEvent
Source§impl PartialEq for CacheEvent
impl PartialEq for CacheEvent
impl StructuralPartialEq for CacheEvent
Auto Trait Implementations§
impl Freeze for CacheEvent
impl RefUnwindSafe for CacheEvent
impl Send for CacheEvent
impl Sync for CacheEvent
impl Unpin for CacheEvent
impl UnsafeUnpin for CacheEvent
impl UnwindSafe for CacheEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.