vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias FetchLoadersOptions

    type FetchLoadersOptions = {
        headers?: Record<string, string>;
        http?: HttpClient;
        cache?: boolean | LoaderCache;
    }
    Index
    headers?: Record<string, string>

    Extra headers on every loader request.

    http?: HttpClient

    vapor-chamber http client override (tests, a pre-configured instance). Default: fresh client.

    cache?: boolean | LoaderCache

    Cache loader reads through the http client's LRU. Default: false — opt-in, like every other cache in this library.

    true uses the client's default TTL. The object form opens the same fresh/stale windows the client already implements: staleTtl serves a past-fresh entry instantly and revalidates in the background (the commit carries snapshot.revalidating while it does), serveStaleOnError falls back to a retained entry when a read fails transiently.

    Per-record override: a route row's meta.cache wins over this default, so a reference-data row and a live-inventory row can differ:

    { name: 'countries', load: '/api/countries', meta: { cache: { ttl: 3_600_000 } } } { name: 'stock', load: '/api/stock', meta: { cache: false } }