basalt / cache/src / SwrOptions
Interface: SwrOptions
Defined in: cache/src/index.ts:48
SwrOptions turns remember into a stale-while-revalidate read.
Properties
staleFor
> staleFor: DurationInput
Defined in: cache/src/index.ts:56
Extra window after ttl during which a stale value is served immediately while a single background revalidation refreshes it. After ttl + staleFor the entry is hard-expired and the next read blocks on the factory.
ttl
> ttl: DurationInput
Defined in: cache/src/index.ts:50
How long the value stays fresh (served without revalidation).