pub async fn write<P, D, K>(cache: P, key: K, data: D) -> Result<Integrity>
Expand description
Writes data
to the cache
, indexing it under key
.
Example
use async_attributes;
#[async_attributes::main]
async fn main() -> cacache::Result<()> {
cacache::write("./my-cache", "my-key", b"hello").await?;
Ok(())
}