pub struct CacheConfig {
pub enabled: bool,
pub default_ttl: String,
pub max_age_days: u32,
pub max_rows: u64,
pub path: Option<String>,
}Expand description
Result-cache configuration (R5 / #5). Default-on with a conservative
5-minute TTL. Backed by a separate results.db (NOT the history
store — cache eviction churns faster than telemetry retention).
The FERRULE_NO_CACHE env var kills the cache for a single
invocation without touching this config. Passing --cache 0 to
ferrule query also bypasses the cache for that one run.
Fields§
§enabled: bool§default_ttl: StringDefault TTL applied to inserts when the caller didn’t pass an
explicit --cache DURATION. Same s/m/h/d suffix grammar
as --since. "0" (the literal string) disables insertion
without disabling lookup of existing entries.
max_age_days: u32Open-loop retention: rows older than this many days are pruned
opportunistically on the next prune() pass. 0 disables.
max_rows: u64Open-loop retention: cap on total rows. Oldest rows are
discarded first. 0 disables.
path: Option<String>Path to the SQLite store. When None, defaults to
<XDG_DATA_HOME>/ferrule/results.db via dirs::data_local_dir().
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more