Skip to content

Commit

Permalink
feat: tinyufo cache supports remove function
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Nov 3, 2024
1 parent 01ffb87 commit 23833bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cache/tiny.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ impl HttpCacheStorage for TinyUfoCache {
self.cache.put(key, data, weight);
Ok(())
}
// TODO remove
// remove object from storage
async fn remove(&self, key: &str) -> Result<Option<CacheObject>> {
let result = self.cache.remove(&key.to_string());
Ok(result)
}
}

#[cfg(test)]
Expand Down

0 comments on commit 23833bf

Please sign in to comment.