pub struct CacheWarmer { /* private fields */ }Expand description
Cache warming utility
Implementations§
Source§impl CacheWarmer
impl CacheWarmer
Sourcepub fn new(cache: Arc<DistributedCache>) -> Self
pub fn new(cache: Arc<DistributedCache>) -> Self
Create a new cache warmer
Sourcepub async fn warm(&self, contexts: Vec<DistributedContext>) -> Result<()>
pub async fn warm(&self, contexts: Vec<DistributedContext>) -> Result<()>
Warm cache with contexts
Sourcepub async fn warm_from_source(
&self,
session_ids: Vec<String>,
source: Arc<dyn ContextStore>,
) -> Result<()>
pub async fn warm_from_source( &self, session_ids: Vec<String>, source: Arc<dyn ContextStore>, ) -> Result<()>
Warm cache with session IDs (loads from source)
Auto Trait Implementations§
impl Freeze for CacheWarmer
impl !RefUnwindSafe for CacheWarmer
impl Send for CacheWarmer
impl Sync for CacheWarmer
impl Unpin for CacheWarmer
impl !UnwindSafe for CacheWarmer
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