pub struct ContentCacheConfig { /* private fields */ }Expand description
Configuration for content caching behavior
Implementations§
Source§impl ContentCacheConfig
impl ContentCacheConfig
Sourcepub fn with_max_items(self, max_items: usize) -> Self
pub fn with_max_items(self, max_items: usize) -> Self
Set maximum content items
Sourcepub fn with_default_ttl(self, ttl: Duration) -> Self
pub fn with_default_ttl(self, ttl: Duration) -> Self
Set default TTL
Sourcepub fn with_memory_limit(self, limit: usize) -> Self
pub fn with_memory_limit(self, limit: usize) -> Self
Set memory limit
Sourcepub fn with_intelligent_management(self, enabled: bool) -> Self
pub fn with_intelligent_management(self, enabled: bool) -> Self
Enable or disable intelligent management
Sourcepub fn with_cleanup_interval(self, interval: Duration) -> Self
pub fn with_cleanup_interval(self, interval: Duration) -> Self
Set cleanup interval
Sourcepub fn max_content_items(&self) -> usize
pub fn max_content_items(&self) -> usize
Getters for configuration values
Sourcepub fn default_ttl(&self) -> Duration
pub fn default_ttl(&self) -> Duration
Get the default TTL for cached content
Sourcepub fn max_content_size(&self) -> usize
pub fn max_content_size(&self) -> usize
Get the maximum content size for cached items
Sourcepub fn memory_limit(&self) -> usize
pub fn memory_limit(&self) -> usize
Get the memory limit for the cache
Sourcepub fn intelligent_management(&self) -> bool
pub fn intelligent_management(&self) -> bool
Check if intelligent cache management is enabled
Sourcepub fn cleanup_interval(&self) -> Duration
pub fn cleanup_interval(&self) -> Duration
Get the cleanup interval for the cache
Sourcepub fn performance_tracking(&self) -> bool
pub fn performance_tracking(&self) -> bool
Check if performance tracking is enabled
Trait Implementations§
Source§impl Clone for ContentCacheConfig
impl Clone for ContentCacheConfig
Source§fn clone(&self) -> ContentCacheConfig
fn clone(&self) -> ContentCacheConfig
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 ContentCacheConfig
impl Debug for ContentCacheConfig
Source§impl Default for ContentCacheConfig
impl Default for ContentCacheConfig
Source§impl<'de> Deserialize<'de> for ContentCacheConfig
impl<'de> Deserialize<'de> for ContentCacheConfig
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 ContentCacheConfig
impl RefUnwindSafe for ContentCacheConfig
impl Send for ContentCacheConfig
impl Sync for ContentCacheConfig
impl Unpin for ContentCacheConfig
impl UnwindSafe for ContentCacheConfig
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