API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceAssetCacheOptions
@codexo/exojs / assets / stable
Construction options for an AssetCache.
6
props
0
methods
0
events
Import
import { AssetCacheOptions } from '@codexo/exojs'Construction options for an AssetCache.
Properties6
How the cache and the network are ordered. Defaults to CacheFirstPolicy. A CachePolicyResolver chooses per acquisition instead of once, for a decision that depends on something outside the route.
promote?: booleanWhether a hit in a later read store is copied into the earlier read stores that are also write stores. Off by default: it is a cheap win for a memory tier in front of a persistent one, and pointless everywhere else.
read?: CacheStorePhysical 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 n… | readonly CacheStorePhysical 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 n…[]Stores consulted on a read, in order. The first hit wins; later stores are not consulted.
Rules applied before the default one, in order. The first route that claims an asset type wins; a route without types claims everything from its position onwards, so any route after it is unreachable.
stores?: CacheStorePhysical 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 n… | readonly CacheStorePhysical 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 n…[]Stores this route both reads and writes. Shorthand for passing the same list as read and write.
write?: CacheStorePhysical 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 n… | readonly CacheStorePhysical 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 n…[]Stores a write goes to. All of them are attempted.
Source