Interface: MemoizeOptions
Properties
Section titled “Properties”ttlMs?
Section titled “ttlMs?”
optionalttlMs?:number
Time-to-live in milliseconds. The cached value expires ttlMs after
it was stored, so the next call past that recomputes; a rejection is
also evicted so a later call retries rather than replaying the error.
Omitted or <= 0 means a successful value is cached forever (the default).
Errors are never cached - see memoize.
Use for periodically-refreshed data (published IP ranges, feature flags, anything fetched once and reused across requests).