pub struct CacheConfig {
pub enable_memory_cache: bool,
pub enable_persistent_cache: bool,
pub max_entries: usize,
pub ttl: Duration,
pub cache_dir: Option<PathBuf>,
}
Expand description
缓存配置
Fields§
§enable_memory_cache: bool
启用内存缓存
enable_persistent_cache: bool
启用持久化缓存
max_entries: usize
最大缓存条目数
ttl: Duration
缓存生存时间
cache_dir: Option<PathBuf>
缓存目录
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