pub struct RowCache { /* private fields */ }Expand description
LRU Row Cache
Implementations§
Source§impl RowCache
impl RowCache
Sourcepub fn with_default_capacity() -> Self
pub fn with_default_capacity() -> Self
Creates cache with default capacity (10,000 entries)
Sourcepub fn auto_tune(&self) -> Option<usize>
pub fn auto_tune(&self) -> Option<usize>
Auto-tuning: adjusts capacity based on hit ratio
Increases capacity if hit ratio is low, maintains if high
Sourcepub fn invalidate(&self, table: &str, key: &[u8])
pub fn invalidate(&self, table: &str, key: &[u8])
Invalidates specific key from cache
Sourcepub fn invalidate_table(&self, table: &str)
pub fn invalidate_table(&self, table: &str)
Invalidates entire table
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Returns cache statistics
Auto Trait Implementations§
impl !Freeze for RowCache
impl RefUnwindSafe for RowCache
impl Send for RowCache
impl Sync for RowCache
impl Unpin for RowCache
impl UnsafeUnpin for RowCache
impl UnwindSafe for RowCache
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> 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>
Converts
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>
Converts
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