pub struct CacheManager {
pub config: CacheConfig,
pub stats: CacheStats,
/* private fields */
}Expand description
Cache manager for workflow caching
Fields§
§config: CacheConfigCache configuration
stats: CacheStatsCache statistics
Implementations§
Source§impl CacheManager
impl CacheManager
Sourcepub fn new(config: CacheConfig) -> Self
pub fn new(config: CacheConfig) -> Self
Create a new cache manager
Sourcepub fn get(&mut self, key: &str) -> Option<&CacheEntry>
pub fn get(&mut self, key: &str) -> Option<&CacheEntry>
Get a cache entry
Sourcepub fn put(&mut self, entry: CacheEntry)
pub fn put(&mut self, entry: CacheEntry)
Put a cache entry
Sourcepub fn invalidate(&mut self, strategy: &InvalidationStrategy) -> usize
pub fn invalidate(&mut self, strategy: &InvalidationStrategy) -> usize
Invalidate cache entries based on strategy
Sourcepub fn get_stats(&self) -> &CacheStats
pub fn get_stats(&self) -> &CacheStats
Get cache statistics
Trait Implementations§
Source§impl Clone for CacheManager
impl Clone for CacheManager
Source§fn clone(&self) -> CacheManager
fn clone(&self) -> CacheManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheManager
impl Debug for CacheManager
Source§impl Default for CacheManager
impl Default for CacheManager
Source§impl<'de> Deserialize<'de> for CacheManager
impl<'de> Deserialize<'de> for CacheManager
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CacheManager
impl RefUnwindSafe for CacheManager
impl Send for CacheManager
impl Sync for CacheManager
impl Unpin 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