pub enum InvalidationMessage {
Remove {
key: String,
},
Update {
key: String,
value: Value,
ttl_secs: Option<u64>,
},
RemovePattern {
pattern: String,
},
RemoveBulk {
keys: Vec<String>,
},
}Expand description
Invalidation message types sent across cache instances via Redis Pub/Sub
Variants§
Remove
Remove a single key from all cache instances
Update
Update a key with new value across all cache instances This is more efficient than Remove for hot keys as it avoids cache miss
RemovePattern
Remove all keys matching a pattern from all cache instances Uses glob-style patterns (e.g., “user:”, “product:123:”)
RemoveBulk
Bulk remove multiple keys at once
Implementations§
Source§impl InvalidationMessage
impl InvalidationMessage
Trait Implementations§
Source§impl Clone for InvalidationMessage
impl Clone for InvalidationMessage
Source§fn clone(&self) -> InvalidationMessage
fn clone(&self) -> InvalidationMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvalidationMessage
impl Debug for InvalidationMessage
Source§impl<'de> Deserialize<'de> for InvalidationMessage
impl<'de> Deserialize<'de> for InvalidationMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InvalidationMessage
impl RefUnwindSafe for InvalidationMessage
impl Send for InvalidationMessage
impl Sync for InvalidationMessage
impl Unpin for InvalidationMessage
impl UnwindSafe for InvalidationMessage
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
Mutably borrows from an owned value. Read more