pub struct AdvancedCache { /* private fields */ }Expand description
Advanced multi-tier cache system
Implementations§
Source§impl AdvancedCache
impl AdvancedCache
Sourcepub fn new(config: AdvancedCacheConfig) -> Self
pub fn new(config: AdvancedCacheConfig) -> Self
Create a new advanced cache system
Sourcepub async fn get(&self, key: &str) -> Option<Value>
pub async fn get(&self, key: &str) -> Option<Value>
Get a value from cache with intelligent tier selection
Sourcepub async fn set(
&self,
key: String,
value: Value,
ttl: Option<Duration>,
complexity: Option<usize>,
dependencies: Option<HashSet<String>>,
tags: Option<HashSet<String>>,
)
pub async fn set( &self, key: String, value: Value, ttl: Option<Duration>, complexity: Option<usize>, dependencies: Option<HashSet<String>>, tags: Option<HashSet<String>>, )
Store a value in cache with intelligent tier placement
Sourcepub async fn invalidate(&self, key: &str, strategy: InvalidationStrategy)
pub async fn invalidate(&self, key: &str, strategy: InvalidationStrategy)
Intelligent cache invalidation
Sourcepub async fn warm_cache(&self, strategy: WarmingStrategy)
pub async fn warm_cache(&self, strategy: WarmingStrategy)
Warm cache with predicted queries
Sourcepub async fn get_metrics(&self) -> CacheMetrics
pub async fn get_metrics(&self) -> CacheMetrics
Get comprehensive cache metrics
Auto Trait Implementations§
impl !RefUnwindSafe for AdvancedCache
impl !UnwindSafe for AdvancedCache
impl Freeze for AdvancedCache
impl Send for AdvancedCache
impl Sync for AdvancedCache
impl Unpin for AdvancedCache
impl UnsafeUnpin for AdvancedCache
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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