pub fn remove<P, K>(cache: P, key: K) -> Result<()>Expand description
Removes an individual index entry synchronously. The associated content will be left in the cache.
ยงExample
use std::io::Read;
fn main() -> cacache_sync::Result<()> {
let sri = cacache_sync::write("./my-cache", "my-key", b"hello")?;
cacache_sync::remove("./my-cache", "my-key")?;
// This fails:
cacache_sync::read("./my-cache", "my-key")?;
// But this succeeds:
cacache_sync::read_hash("./my-cache", &sri)?;
Ok(())
}