API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSingleEntryLayout
CacheLayout for a representation that occupies one record. This is what almost every asset type wants: the codec produced one value, and the cache keeps that one value. It is the default an AssetType carries, so a type that needs nothing else declares nothing at all. Raise the version when the codec's stored representation changes shape. Records written under the old version stop being found and are re-acquired.
import { SingleEntryLayout } from '@codexo/exojs'CacheLayout for a representation that occupies one record.
This is what almost every asset type wants: the codec produced one value, and the cache keeps that one value. It is the default an AssetType carries, so a type that needs nothing else declares nothing at all.
Raise the version when the codec's stored representation changes shape. Records written under the old version stop being found and are re-acquired.
read(context: CacheLayoutContextThe store operations a CacheLayout may use, scoped to one acquisition. A layout addresses its own records by name and never composes a CacheRecordKey itself: t…): Promise<CacheReadResultThe outcome of reading one cache record. A miss and a failure are deliberately different things: a miss resolves to `{ hit: false }`, a store that could not an…<Stored>>write(stored: Stored, context: CacheLayoutContextThe store operations a CacheLayout may use, scoped to one acquisition. A layout addresses its own records by name and never composes a CacheRecordKey itself: t…): Promise<void>version(version: number): SingleEntryLayout<Stored>version: number