Skip to main content

Module cache

Module cache 

Source
Expand description

Render-time intermediate cache, keyed by a content-derived hash.

A bounded LRU keeps long editor sessions from growing without limit. Default capacity is 4096 entries; tune via Cache::with_capacity. At ~1.3 MB per padded raster that ceilings around ~5 GB worst case, but in practice intermediates are mostly small (masks, features) and the cap-by-count is the right knob.

Structs§

Cache
Shared cache of evaluated PortValues. Cloning a PortValue is cheap (Arc-backed for the heavy variants) so cache reuse adds near-zero overhead.
CacheKey
Compose a cache key for one node evaluation.

Constants§

DEFAULT_CAPACITY
Default LRU capacity. Each entry holds an Arc<PortValue> so the payload is shared, not duplicated; the cap bounds how many distinct intermediates the evaluator remembers, not raw bytes.

Type Aliases§

Hash128
128-bit content hash. Wide enough that collisions are not a concern for our scale; narrow enough to fit four words.