Skip to content

Documentation / @ripl/utilities / functionCache

Function: functionCache() ​

functionCache<TValue>(value): CachedFunction<TValue>

Defined in: function.ts:39

Wraps a function so its result is computed once and then returned from cache on subsequent calls until invalidate() is called.

Type Parameters ​

Type Parameter
TValue extends AnyFunction

Parameters ​

ParameterType
valueTValue

Returns ​

CachedFunction<TValue>