memoize
Creates a function that memoizes the result of a given function.
The cache key is determined by the resolver or by the arguments from the function call.
Options:
resolverA function that determines the cache key based on the arguments provided.ttlthe time to live for the cache entries in milliseconds.
Properties:
cacheThe cache is an instance ofMapand can be used to clear or inspect the cache. It can be replaced by a custom cache that matches theMapinterface.
This function can be used as a decorator with decMemoize.