pub struct CacheManager { /* private fields */ }Expand description
Cache manager that handles multiple caches.
Implementations§
Source§impl CacheManager
impl CacheManager
Sourcepub fn new(config: &PerformanceConfig) -> Self
pub fn new(config: &PerformanceConfig) -> Self
Create a new cache manager.
Sourcepub async fn put_packages(&self, key: String, packages: Vec<Package>)
pub async fn put_packages(&self, key: String, packages: Vec<Package>)
Put packages into cache.
Sourcepub async fn get_validation(&self, key: &str) -> Option<ValidationResult>
pub async fn get_validation(&self, key: &str) -> Option<ValidationResult>
Get validation result from cache.
Sourcepub async fn put_validation(&self, key: String, result: ValidationResult)
pub async fn put_validation(&self, key: String, result: ValidationResult)
Put validation result into cache.
Sourcepub async fn get_completions(&self, key: &str) -> Option<Vec<String>>
pub async fn get_completions(&self, key: &str) -> Option<Vec<String>>
Get completion results from cache.
Sourcepub async fn put_completions(&self, key: String, completions: Vec<String>)
pub async fn put_completions(&self, key: String, completions: Vec<String>)
Put completion results into cache.
Sourcepub async fn get_stats(&self) -> CacheStats
pub async fn get_stats(&self) -> CacheStats
Get overall cache statistics.
Auto Trait Implementations§
impl Freeze for CacheManager
impl !RefUnwindSafe for CacheManager
impl Send for CacheManager
impl Sync for CacheManager
impl Unpin for CacheManager
impl UnsafeUnpin for CacheManager
impl !UnwindSafe for CacheManager
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