API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceCacheRouteOptions
@codexo/exojs / assets / stable
Construction options for a CacheRoute.
6
props
0
methods
0
events
Import
import { CacheRouteOptions } from '@codexo/exojs'Construction options for a CacheRoute.
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.
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.
types?: readonly string[]Asset type ids this route applies to. Omit it for a route that applies to every type that no earlier route claimed.
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