Functionin simplefastly 0.13.1View source
fn get(key: impl Into<CacheKey>) -> Result<Option<Body>, CacheError>

Get the entry associated with the given cache key, if it exists.

if let Some(value) = get("my_key")? {
let cached_string = value.into_string();
println!("the cached string was: {cached_string}");
}

Argument type conversion

See the From impls for Bytes to see which types can be used as a key.

Parameters

key: impl Into<CacheKey>

Returns