Implement simple persistent cache with automatic saving on status changes

This commit is contained in:
2025-10-21 20:12:19 +02:00
parent 338c4457a5
commit a08670071c
6 changed files with 116 additions and 104 deletions

View File

@@ -112,14 +112,8 @@ pub fn validate_config(config: &AgentConfig) -> Result<()> {
}
// Validate cache configuration
if config.cache.enabled {
if config.cache.default_ttl_seconds == 0 {
bail!("Cache TTL cannot be 0");
}
if config.cache.max_entries == 0 {
bail!("Cache max entries cannot be 0");
}
if config.cache.persist_path.is_empty() {
bail!("Cache persist path cannot be empty");
}
Ok(())