pub fn read_sync<P, K>(cache: P, key: K) -> Result<Vec<u8>>
Expand description
Reads the entire contents of a cache file synchronously into a bytes vector, looking the data up by key.
§Example
use std::io::Read;
fn main() -> cacache::Result<()> {
let data = cacache::read_sync("./my-cache", "my-key")?;
Ok(())
}