pub struct CachingQueryProcessor<P> { /* private fields */ }Expand description
A caching wrapper for the query processor.
This type wraps a query processor and adds caching capabilities. Use this for production deployments where query caching is beneficial.
Implementations§
Source§impl<P> CachingQueryProcessor<P>
impl<P> CachingQueryProcessor<P>
Sourcepub fn new(processor: P, cache: QueryCache) -> Self
pub fn new(processor: P, cache: QueryCache) -> Self
Creates a new caching processor.
Sourcepub fn with_default_cache(processor: P) -> Self
pub fn with_default_cache(processor: P) -> Self
Creates a new caching processor with default cache settings.
Sourcepub fn cache(&self) -> &QueryCache
pub fn cache(&self) -> &QueryCache
Returns a reference to the cache.
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Returns cache statistics.
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clears the cache.
Auto Trait Implementations§
impl<P> !Freeze for CachingQueryProcessor<P>
impl<P> !RefUnwindSafe for CachingQueryProcessor<P>
impl<P> Send for CachingQueryProcessor<P>where
P: Send,
impl<P> Sync for CachingQueryProcessor<P>where
P: Sync,
impl<P> Unpin for CachingQueryProcessor<P>where
P: Unpin,
impl<P> UnsafeUnpin for CachingQueryProcessor<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for CachingQueryProcessor<P>where
P: UnwindSafe,
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