API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceCacheStore
Physical storage for cache records. A store is asset-agnostic by contract: it never sees an asset type, a factory, a codec or a runtime resource, and it does not decide policy. It is handed a CacheRecordKey and a structured-clone-compatible value, and its only job is to keep them and hand them back. ## Failures are reported, never swallowed A store must reject when it could not do what it was asked. A missing entry is not a failure - it resolves to a miss. Whether a failure degrades the load or fails it is a CachePolicy decision, and a store that returns an absent value for a broken database takes that decision away from it. ## Values Values are whatever an AssetSourceCodec produced as its stored representation. Implementations should accept anything the structured-clone algorithm accepts - strings, `ArrayBuffer`s, typed arrays, `Blob`s, plain objects - rather than constraining callers to one shape.
import { CacheStore } from '@codexo/exojs'Physical storage for cache records.
A store is asset-agnostic by contract: it never sees an asset type, a factory, a codec or a runtime resource, and it does not decide policy. It is handed a CacheRecordKey and a structured-clone-compatible value, and its only job is to keep them and hand them back.
## Failures are reported, never swallowed
A store must reject when it could not do what it was asked. A missing entry is not a failure - it resolves to a miss. Whether a failure degrades the load or fails it is a CachePolicy decision, and a store that returns an absent value for a broken database takes that decision away from it.
## Values
Values are whatever an AssetSourceCodec produced as its stored representation. Implementations should accept anything the structured-clone algorithm accepts - strings, `ArrayBuffer`s, typed arrays, `Blob`s, plain objects - rather than constraining callers to one shape.
clear(namespace?: string): Promise<void>destroy(): voidget(key: CacheRecordKeyThe identity of one persisted cache record. A SourceKey alone is deliberately not enough. It carries no asset type - two types may acquire one URL and keep ent…): 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…>id: string