pub enum CacheMode {
Normal,
Bypass,
Refresh,
ReadOnly,
}Expand description
Cache behaviour requested by the caller via tt_extras.cache.
Absent (no cache key in tt_extras) is treated as CacheMode::Normal.
JSON shape:
{ "cache": { "mode": "bypass", "ttl_secs": 3600 } }Variants§
Normal
Normal read-write caching (default when key absent).
Bypass
Skip lookup AND insert — always hit the provider, never populate cache.
Refresh
Skip lookup, but DO insert (force-refresh stale entry).
ReadOnly
Do lookup, but never insert (read-only cache consumer).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CacheMode
impl<'de> Deserialize<'de> for CacheMode
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
impl Eq for CacheMode
impl StructuralPartialEq for CacheMode
Auto Trait Implementations§
impl Freeze for CacheMode
impl RefUnwindSafe for CacheMode
impl Send for CacheMode
impl Sync for CacheMode
impl Unpin for CacheMode
impl UnsafeUnpin for CacheMode
impl UnwindSafe for CacheMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.