Optionaloptions: SliceCacheOptionsPrivate Static ReadonlyMAX_Tombstone cap — bounded so long sessions can't grow it unboundedly.
PrivatecachePrivatedebugPrivate ReadonlymaxPrivate ReadonlytombstonesPrivatethrashPrivate ReadonlyoversizedPrivate ReadonlyladderPrivate StaticdefaultDefault cache size derived from config.cache.sliceCacheMaxSizeMB. A method, not a static initializer: reading config at module-load time couples every transitive importer (e.g. the shared facade helpers) to a fully-populated config mock in tests.
Get a cached per-slice entry (LRU-promotes it).
Cache key (use SliceCache.makeKey).
Cached entry or undefined on miss.
Cache a per-slice entry (may evict entries to stay within budget).
Cache key (use SliceCache.makeKey).
Cloned payload + its retained byte size.
Optionalopts: { scan?: boolean; pin?: boolean }
Optionalscan?: booleanThe caller KNOWS it is storing inside a sequential
scan (dimension playback: the loaders pass frameBudgetMs !== null).
Evicts from the MRU end instead of LRU — scan-resistant eviction that
keeps the loop-head prefix resident across cyclic loops (see
LRUCache.set). Known trade-off: under bounce loop mode near a
turnaround this is locally worse than LRU (the loaders only see the
budget directive, not the loop mode) — accepted; a loop-mode-aware
per-pass hint is a possible follow-up.
Optionalpin?: booleanProtect this entry from eviction until it is next read (unpinned on the first get hit). The SlicePrefetcher sets it so a projected next-frame slice — which lands as the MRU entry and would be the FIRST victim of a subsequent scan store under budget pressure — survives until the foreground tick restores it. Best-effort: if the whole working set is pinned and over budget, pinned entries are still evicted.
Check whether a slice is cached (without LRU promotion).
Read an entry WITHOUT LRU promotion and WITHOUT counting a hit/miss.
Used by storeLadder's upgrade-if-longer check so bookkeeping reads
don't perturb the hit-rate statistic the monitor reports.
Remove one cached slice without leaving an eviction tombstone.
Cache key to invalidate.
Whether an entry was removed.
Whether an entry of bytes could ever be stored (i.e. it does not exceed
the whole budget). The LRU silently rejects oversized entries, so callers
check this BEFORE doing the (potentially large) clone to avoid a wasted
copy that would just be dropped — see storeLadder.
Warn-once gate for oversized ladders: returns true the FIRST time key is
reported oversized (a full ladder exceeding the whole budget, so only a
coarse prefix is cached — see storeLadder), false thereafter. Bounded
FIFO + cleared on clear, so warnings can't leak across a long
session or a dataset switch (mirrors the tombstone discipline).
Clear all cached slices (invoked on content-hash / dataset invalidation).
Dispose the cache, releasing all cached slices.
Cache statistics for the monitor.
PrivaterecordPrivaterecordRecord an evicted key as a tombstone (bounded FIFO).
StaticmakeBuild a cache key from a node path and a view signature.
The NUL separator can't appear in a node path or the JSON-ish view signature, so the two are always unambiguously recoverable.
Scene-graph path of the geometry node (per-node namespace).
Stable serialization of the query view (slice/tolerance/displayDims).
SliceCache — byte-budget LRU of decoded per-slice geometry.
Key format:
${nodePath}\u0000${viewSig}(see SliceCache.makeKey), whereviewSigis a stable serialization of the query's displayDims / slicePosition / tolerance / dimensions — the loader'sviewStatesEqualfields, ALL of them (a key narrower than that equality can restore a snapshot the loader itself would have reloaded; seedata/loaders/progressive/slice-cache-helper.ts::buildSliceViewSig).