pub struct IntelligentQueryCache { /* private fields */ }Expand description
Intelligent query cache with pattern learning and prediction
Implementations§
Source§impl IntelligentQueryCache
impl IntelligentQueryCache
pub fn new(config: IntelligentCacheConfig) -> Self
pub async fn with_distributed_cache( self, cache_config: CacheConfig, ) -> Result<Self>
Sourcepub fn generate_cache_key(
&self,
query: &str,
variables: &HashMap<String, Value>,
) -> String
pub fn generate_cache_key( &self, query: &str, variables: &HashMap<String, Value>, ) -> String
Generate cache key for a query
Sourcepub async fn get(
&self,
query: &str,
variables: &HashMap<String, Value>,
) -> Option<Value>
pub async fn get( &self, query: &str, variables: &HashMap<String, Value>, ) -> Option<Value>
Get cached query result
Sourcepub async fn set(
&self,
query: &str,
variables: &HashMap<String, Value>,
result: Value,
doc: &Document,
) -> Result<()>
pub async fn set( &self, query: &str, variables: &HashMap<String, Value>, result: Value, doc: &Document, ) -> Result<()>
Store query result in cache
Sourcepub async fn predict_queries(&self) -> Vec<(String, f64)>
pub async fn predict_queries(&self) -> Vec<(String, f64)>
Predict queries that should be pre-cached based on patterns
Sourcepub async fn cleanup_expired(&self) -> usize
pub async fn cleanup_expired(&self) -> usize
Clear expired entries from cache
Sourcepub async fn get_advanced_analytics(&self) -> AdvancedCacheAnalytics
pub async fn get_advanced_analytics(&self) -> AdvancedCacheAnalytics
Advanced performance analytics and optimization system
Auto Trait Implementations§
impl !RefUnwindSafe for IntelligentQueryCache
impl !UnwindSafe for IntelligentQueryCache
impl Freeze for IntelligentQueryCache
impl Send for IntelligentQueryCache
impl Sync for IntelligentQueryCache
impl Unpin for IntelligentQueryCache
impl UnsafeUnpin for IntelligentQueryCache
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