pub struct ResultCacheStats {
pub entries: usize,
pub hits: u64,
pub misses: u64,
pub invalidations: u64,
pub memory_bytes: usize,
pub ttl_seconds: u64,
pub max_entries: usize,
}Expand description
A snapshot of an adapter’s query-result cache, for the operator surface.
Exists because the admin API could see only the Arrow Flight query cache, and so
answered “Cache is not configured” for a server whose sibling endpoint reported the
query result cache active in the same breath (#941). An adapter that caches nothing
returns None from
DatabaseAdapter::result_cache_stats
— “no such cache” and “a cache holding zero entries” are different answers and the
endpoint must not conflate them.
Fields§
§entries: usizeEntries currently held.
hits: u64Lookups served from cache.
misses: u64Lookups that reached the database.
invalidations: u64Invalidations performed (mutation sweeps, entity evictions, admin clears).
memory_bytes: usizeEstimated memory held, in bytes.
ttl_seconds: u64Configured default entry TTL, in seconds.
max_entries: usizeConfigured entry ceiling.
Trait Implementations§
Source§impl Clone for ResultCacheStats
impl Clone for ResultCacheStats
Source§fn clone(&self) -> ResultCacheStats
fn clone(&self) -> ResultCacheStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResultCacheStats
Source§impl Debug for ResultCacheStats
impl Debug for ResultCacheStats
Source§impl Default for ResultCacheStats
impl Default for ResultCacheStats
Source§fn default() -> ResultCacheStats
fn default() -> ResultCacheStats
Returns the “default value” for a type. Read more
impl Eq for ResultCacheStats
Source§impl PartialEq for ResultCacheStats
impl PartialEq for ResultCacheStats
impl StructuralPartialEq for ResultCacheStats
Auto Trait Implementations§
impl Freeze for ResultCacheStats
impl RefUnwindSafe for ResultCacheStats
impl Send for ResultCacheStats
impl Sync for ResultCacheStats
impl Unpin for ResultCacheStats
impl UnsafeUnpin for ResultCacheStats
impl UnwindSafe for ResultCacheStats
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,
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.