pub struct CacheConfig {
pub enabled: Option<bool>,
pub ttl: CacheTtls,
pub image_max_mb: Option<u64>,
pub index_max_age_days: Option<u64>,
}Expand description
[cache] in config.toml. Every key is optional.
[cache]
enabled = true
image_max_mb = 500 # image store cap, LRU-evicted
index_max_age_days = 30 # `grab cache prune` drops older catalog rows
[cache.ttl] # seconds; 0 disables caching for that kind
list = 600
menu = 1800
details = 21600
categories = 86400Fields§
§enabled: Option<bool>§ttl: CacheTtls§image_max_mb: Option<u64>§index_max_age_days: Option<u64>Implementations§
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§impl Debug for CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
impl Default for CacheConfig
Source§impl<'de> Deserialize<'de> for CacheConfigwhere
CacheConfig: Default,
impl<'de> Deserialize<'de> for CacheConfigwhere
CacheConfig: Default,
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 CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin 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