mirror of
https://codeberg.org/YGGverse/psocks.git
synced 2026-04-01 00:45:27 +00:00
implement cache/clean api
This commit is contained in:
parent
0603fdf4a6
commit
461f838cc0
4 changed files with 35 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue