pub async fn write_with_algo<P, D, K>(
algo: Algorithm,
cache: P,
key: K,
data: D,
) -> Result<Integrity>Expand description
Writes data to the cache, indexing it under key. Use this function
to customize the hashing algorithm.
ยงExample
use async_attributes;
#[async_attributes::main]
async fn main() -> cacache::Result<()> {
cacache::write_with_algo(cacache::Algorithm::Xxh3, "./my-cache", "my-key", b"hello").await?;
Ok(())
}