pub enum NoCacheReason {
NeverEnabled,
OriginNotCache,
ResponseTooLarge,
StorageError,
InternalError,
Deferred,
CacheLockGiveUp,
CacheLockTimeout,
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
StorageError
Due to internal caching storage error
InternalError
Due to other types of internal issues
Deferred
will be cacheable but skip cache admission now
This happens when the cache predictor predicted that this request is not cacheable, but the response turns out to be OK to cache. However, it might be too large to re-enable caching for this request.
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
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NoCacheReason
impl Debug for NoCacheReason
Source§impl PartialEq for NoCacheReason
impl PartialEq for NoCacheReason
impl Copy for NoCacheReason
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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.