[−][src]Function cacache::write
pub async fn write<P, D, K>(cache: P, key: K, data: D) -> Result<Integrity> where
P: AsRef<Path>,
D: AsRef<[u8]>,
K: AsRef<str>,
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(()) }