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

@@ -240,7 +240,7 @@ impl MetricCollectionManager {
/// Get all cached metrics from the cache manager
pub async fn get_all_cached_metrics(&self) -> Result<Vec<Metric>> {
let cached_metrics = self.cache_manager.get_all_cached_metrics().await;
let cached_metrics = self.cache_manager.get_all_cached_metrics().await?;
debug!(
"Retrieved {} cached metrics for broadcast",
cached_metrics.len()
@@ -248,4 +248,8 @@ impl MetricCollectionManager {
Ok(cached_metrics)
}
pub fn get_cache_manager(&self) -> &MetricCacheManager {
&self.cache_manager
}
}