pub enum NoCacheReason {
Show 13 variants
NeverEnabled,
OriginNotCache,
ResponseTooLarge,
PredictedResponseTooLarge,
StorageError,
InternalError,
Deferred,
DeclinedToUpstream,
UpstreamError,
CacheLockGiveUp,
CacheLockTimeout,
CacheLockRetryLimit,
Custom(&'static str),
}Expand description
The possible reasons for not caching
Variants§
NeverEnabled
Caching is not enabled to begin with
OriginNotCache
Origin directives indicated this was not cacheable
ResponseTooLarge
Response size was larger than the cache’s configured maximum asset size
PredictedResponseTooLarge
Disabling caching due to unknown body size and previously exceeding maximum asset size; the asset is otherwise cacheable, but cache needs to confirm the final size of the asset before it can mark it as cacheable again.
StorageError
Due to internal caching storage error
InternalError
Due to other types of internal issues
Deferred
The response may be cacheable, but this request should not fill the cache.
This can happen when an admission policy defers an absent key, or when the cache predictor bypassed lookup and the response cannot safely be admitted by the current request.
DeclinedToUpstream
Due to the proxy upstream filter declining the current request from going upstream
UpstreamError
Due to the upstream being unreachable or otherwise erroring during proxying
CacheLockGiveUp
The writer of the cache lock sees that the request is not cacheable (Could be OriginNotCache)
CacheLockTimeout
This request waited too long for the writer of the cache lock to finish, so this request will fetch from the origin without caching
CacheLockRetryLimit
This request retried cache lookup too many times after waiting behind cache locks, so this request will fetch from the origin without caching.
Custom(&'static str)
Other custom defined reasons
Implementations§
Source§impl NoCacheReason
impl NoCacheReason
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Convert NoCacheReason as str, for logging and debugging.
Trait Implementations§
Source§impl Clone for NoCacheReason
impl Clone for NoCacheReason
Source§fn clone(&self) -> NoCacheReason
fn clone(&self) -> NoCacheReason
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 NoCacheReason
Source§impl Debug for NoCacheReason
impl Debug for NoCacheReason
impl Eq for NoCacheReason
Source§impl PartialEq for NoCacheReason
impl PartialEq for NoCacheReason
impl StructuralPartialEq for NoCacheReason
Auto Trait Implementations§
impl Freeze for NoCacheReason
impl RefUnwindSafe for NoCacheReason
impl Send for NoCacheReason
impl Sync for NoCacheReason
impl Unpin for NoCacheReason
impl UnsafeUnpin for NoCacheReason
impl UnwindSafe for NoCacheReason
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.