Skip to content

CreateLayoutCacheParams

Defined in: src/layout/layoutCache.ts:33

Parameters for createLayoutCache.

maxEntries?: number;

Defined in: src/layout/layoutCache.ts:45

Most recently used entries to retain.

This bounds the entry count, not memory: each entry retains a full laid-out graph plus its exact-string key, both proportional to the graph (the key alone measures ~83,000 characters for a 500-state machine). A host holding one of these across large definitions should size it accordingly and LayoutCache.clear when a document closes.

32