HeightfieldArchive

class HeightfieldArchive

One store, and everything its users share.

The CPU and GPU producers write to the same store under different namespaces, so a clear has to retire both producers' lookups in flight, and the counters describe the store, not one producer. That state lives here and nowhere else: a wrapper made by wrap holds the archive's, so clearing through the archive is the only clear there is.

packages/workers/src/heightfieldCache.ts:234

Members

constructor

constructor(store: HeightfieldStore) → HeightfieldArchive
storeHeightfieldStore
Undocumented

clear

clear() → Promise<void>

In-flight lookups cannot repopulate a cache the caller just cleared.

close

close() → Promise<void>

Finish the writes in flight, then release the store. After this a wrapper passes straight through to its source: a write landing after the close would reopen a handle nothing is waiting on.

flush

flush() → Promise<void>

Wait for every write in flight.

stats

storage

storage() → Promise<HeightfieldStoreStats>

The host's retained entries and bytes. Refused after close, as clear is: a disk store reopens its handle for any call.

wrap

The source, answering from the archive first, under its own namespace.

sourceArchivedSource
Undocumented