pub enum ForcedFreshness {
ForceExpired,
ForceExpiredServeStale {
expired_at: Option<SystemTime>,
},
ForceMiss,
ForceFresh,
}Expand description
Indicators of which level of cache freshness logic to force apply to an asset.
For example, should an existing fresh asset be revalidated or re-retrieved altogether.
Variants§
ForceExpired
Indicates the asset should be considered stale and revalidated, with its stale-while-revalidate and stale-if-error windows closed so that readers wait on the revalidation
ForceExpiredServeStale
Indicates the asset should be considered stale, leaving its stale-while-revalidate and stale-if-error windows to decide whether the stale body can still be served while it revalidates
expired_at is when the asset went out of service, such as the timestamp a purge was
recorded at. CacheMeta::expire_at applies it and explains why it has to be that
point rather than the time of the lookup.
None when the asset is out of service but the caller does not know when it went out,
which leaves the windows measured from the asset’s own deadline.
Fields
expired_at: Option<SystemTime>ForceMiss
Indicates the asset should be considered absent and treated like a miss instead of a hit
ForceFresh
Indicates the asset should be considered fresh despite possibly being stale
Trait Implementations§
Source§impl Clone for ForcedFreshness
impl Clone for ForcedFreshness
Source§fn clone(&self) -> ForcedFreshness
fn clone(&self) -> ForcedFreshness
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 ForcedFreshness
Source§impl Debug for ForcedFreshness
impl Debug for ForcedFreshness
impl Eq for ForcedFreshness
Source§impl PartialEq for ForcedFreshness
impl PartialEq for ForcedFreshness
impl StructuralPartialEq for ForcedFreshness
Auto Trait Implementations§
impl Freeze for ForcedFreshness
impl RefUnwindSafe for ForcedFreshness
impl Send for ForcedFreshness
impl Sync for ForcedFreshness
impl Unpin for ForcedFreshness
impl UnsafeUnpin for ForcedFreshness
impl UnwindSafe for ForcedFreshness
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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.