implement cache/clean api

This commit is contained in:
postscriptum 2026-03-23 08:47:47 +02:00
parent 0603fdf4a6
commit 461f838cc0
4 changed files with 35 additions and 3 deletions

View file

@ -90,4 +90,9 @@ impl List {
self.cache.block(rule).await?;
Ok(self.index.write().await.remove(&Item::from_line(rule)))
}
/// Privately clean `--cache` file collected, return deleted rules
/// * we can implement `self.index` update at this step @TODO
pub async fn cache_clean(&self) -> Result<Option<Vec<String>>> {
self.cache.clean().await
}
}