Skip to content

CacheOptions

optional maxEntries?: number


optional persist?: boolean | { maxAgeMs?: number; maxEntries?: number; }

Opt-in persistent stale-while-revalidate layer: a successful presentation/reference resolve is written to localStorage, and peekLocation/peekReference read it back synchronously so a repeat visit’s first paint is real content instead of a loading state. Off by default — an unconfigured client’s behavior (including in Node) is unchanged. true uses the defaults (maxAgeMs: 24h, maxEntries: 20); an object overrides either.