Skip to main content

with_cache

Function with_cache 

Source
pub fn with_cache<F>(
    policy: CachePolicy,
    source: &str,
    dest: &str,
    key: RenderKey,
    convert: F,
) -> bool
where F: FnOnce() -> bool,
Expand description

Bytes-only cache wrapper. Use when the caller doesn’t need dimensions cached (e.g. SVG path where viewBox dims are cheap to re-read from disk). Returns true on success.

policy decides whether the shared cache is consulted at all; see CachePolicy.