pub struct CacheConfig {
pub enable_search: bool,
pub search_ttl: Duration,
pub enable_info: bool,
pub info_ttl: Duration,
pub enable_comments: bool,
pub comments_ttl: Duration,
pub enable_pkgbuild: bool,
pub pkgbuild_ttl: Duration,
pub memory_cache_size: usize,
pub enable_disk_cache: bool,
}Expand description
What: Configuration for cache behavior.
Inputs: None (created via CacheConfig::builder() or default())
Output:
CacheConfiginstance with configurable cache settings
Details:
- Controls per-operation cache enable/disable flags
- Configures TTL for each operation type
- Sets memory cache size limits
- Controls disk cache enable/disable
Fields§
§enable_search: boolWhether search operation caching is enabled (default: false).
search_ttl: DurationTTL for search cache entries (default: 5 minutes).
enable_info: boolWhether info operation caching is enabled (default: false).
info_ttl: DurationTTL for info cache entries (default: 15 minutes).
enable_comments: boolWhether comments operation caching is enabled (default: false).
comments_ttl: DurationTTL for comments cache entries (default: 10 minutes).
enable_pkgbuild: boolWhether pkgbuild operation caching is enabled (default: false).
pkgbuild_ttl: DurationTTL for pkgbuild cache entries (default: 1 hour).
memory_cache_size: usizeMaximum number of entries in memory cache per operation (default: 100).
enable_disk_cache: boolWhether disk cache is enabled (default: false).
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
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 CacheConfig
impl Debug for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnwindSafe for CacheConfig
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