pub struct CacheWarmer { /* private fields */ }Expand description
Cache warmer for pre-populating caches
Implementations§
Source§impl CacheWarmer
impl CacheWarmer
Sourcepub fn new(engine: Arc<HybridRebacEngine>) -> Self
pub fn new(engine: Arc<HybridRebacEngine>) -> Self
Create a new cache warmer
Sourcepub async fn warm(&self, config: WarmingConfig) -> Result<WarmingStats>
pub async fn warm(&self, config: WarmingConfig) -> Result<WarmingStats>
Warm cache using configuration
Sourcepub async fn warm_hot_paths(&self, limit: usize) -> Result<WarmingStats>
pub async fn warm_hot_paths(&self, limit: usize) -> Result<WarmingStats>
Warm hot paths (most frequently accessed)
Sourcepub async fn warm_tenant(&self, tenant_id: &str) -> Result<WarmingStats>
pub async fn warm_tenant(&self, tenant_id: &str) -> Result<WarmingStats>
Warm specific tenant
Sourcepub async fn warm_namespace(&self, namespace: &str) -> Result<WarmingStats>
pub async fn warm_namespace(&self, namespace: &str) -> Result<WarmingStats>
Warm specific namespace
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
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