API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classCacheOnlyPolicy

@codexo/exojs / assets / stable

Reads the cache and never touches the network. For a shipped or pre-warmed cache, and for offline modes that must fail loudly rather than reach for the network. A missing record rejects with an AssetCacheMissError; a store that could not answer rejects with the store's own `AssetCacheError`. Those are different failures and stay different, which is the whole point of using this policy over a fetch that happens to be offline.

0
props
1
methods
0
events
Import
import { CacheOnlyPolicy } from '@codexo/exojs'

Reads the cache and never touches the network.

For a shipped or pre-warmed cache, and for offline modes that must fail loudly rather than reach for the network. A missing record rejects with an AssetCacheMissError; a store that could not answer rejects with the store's own `AssetCacheError`. Those are different failures and stay different, which is the whole point of using this policy over a fetch that happens to be offline.

Constructors1
new(): CacheOnlyPolicy
Methods1
Source