Prevent expensive, repeat function calls by caching the result and returning
the cached result when the cacheKey matches
The cache key must be toString-able.
The cache key will automatically default to the first argument of the memoized function,
otherwise the cacheKeyGenerator can be used.
The cacheKeyGenerator must be used when the first argument is an object, otherwise the
cacheKey will be converted to '[object Object]' which could provided unexpected results
Prevent expensive, repeat function calls by caching the result and returning the cached result when the cacheKey matches
The cache key must be toString-able. The cache key will automatically default to the first argument of the memoized function, otherwise the cacheKeyGenerator can be used. The cacheKeyGenerator must be used when the first argument is an object, otherwise the cacheKey will be converted to '[object Object]' which could provided unexpected results