pub enum CacheStatus {
Disabled,
RlsGuardOnly,
Active,
}Expand description
Current status of the query result cache as understood by the server.
Used in the admin config endpoint and startup logs to give operators
an accurate picture of what cache_enabled actually activates.
Variants§
Disabled
cache_enabled = false — no cache guard or caching active.
RlsGuardOnly
CachedDatabaseAdapter is now always wired when cache_enabled = true. Use Active or Disabled instead.
cache_enabled = true — RLS safety guard is active, but full
query result caching (CachedDatabaseAdapter) is not yet wired.
Active
Full query result caching is active.
CachedDatabaseAdapter is wired into the server when cache_enabled = true.
Implementations§
Source§impl CacheStatus
impl CacheStatus
Sourcepub const fn from_cache_enabled(cache_enabled: bool) -> Self
👎Deprecated since 2.2.0: Use AppState::adapter_cache_enabled to determine the true cache state. This function returns RlsGuardOnly which is no longer accurate.
pub const fn from_cache_enabled(cache_enabled: bool) -> Self
Use AppState::adapter_cache_enabled to determine the true cache state. This function returns RlsGuardOnly which is no longer accurate.
Derive cache status from the cache_enabled flag.
§Deprecated
Use AppState::adapter_cache_enabled to determine the true cache state.
Trait Implementations§
Source§impl Clone for CacheStatus
impl Clone for CacheStatus
Source§fn clone(&self) -> CacheStatus
fn clone(&self) -> CacheStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheStatus
impl Debug for CacheStatus
Source§impl<'de> Deserialize<'de> for CacheStatus
impl<'de> Deserialize<'de> for CacheStatus
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>,
Source§impl PartialEq for CacheStatus
impl PartialEq for CacheStatus
Source§impl Serialize for CacheStatus
impl Serialize for CacheStatus
impl Eq for CacheStatus
impl StructuralPartialEq for CacheStatus
Auto Trait Implementations§
impl Freeze for CacheStatus
impl RefUnwindSafe for CacheStatus
impl Send for CacheStatus
impl Sync for CacheStatus
impl Unpin for CacheStatus
impl UnsafeUnpin for CacheStatus
impl UnwindSafe for CacheStatus
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§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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more