The function to memoize results.
Returns a memoized function with a clear method to reset the cached value.
Returns a wrapper function where when called, retains the return value of inner, returning that
value on consecutive calls without invoking inner again.
The function to memoize results.
When more than one parameter is expected, a keyProvider is required, which returns a unique key given the arguments provided to the memoized function.
Rest...args: Parameters<T>Optionalcapacity: numberReturns a memoized function with a clear method to reset the cache.
Returns a wrapper function where when called, retains the return value of
inner, returning that value on consecutive calls without invokinginneragain.