API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classCacheOnlyPolicy
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.
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.
new(): CacheOnlyPolicy