API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classCacheFirstPolicy
Reads the cache first and only fetches when it misses. The default policy, and the right one for content that does not change behind a stable URL. A cache failure never fails a load that the network could still serve: a read failure is degraded into a miss, and a write failure is degraded into "not cached this time". Both are reported to Loader.onCacheError before they are degraded, so a store that is silently refusing every write stays diagnosable. A missing entry and a failing store therefore behave the same way HERE, and differently everywhere it matters - see CacheOnlyPolicy, which has no network leg to degrade onto.
import { CacheFirstPolicy } from '@codexo/exojs'Reads the cache first and only fetches when it misses.
The default policy, and the right one for content that does not change behind a stable URL. A cache failure never fails a load that the network could still serve: a read failure is degraded into a miss, and a write failure is degraded into "not cached this time". Both are reported to Loader.onCacheError before they are degraded, so a store that is silently refusing every write stays diagnosable.
A missing entry and a failing store therefore behave the same way HERE, and differently everywhere it matters - see CacheOnlyPolicy, which has no network leg to degrade onto.
new(): CacheFirstPolicy