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> 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