Memoizes the decorated function.
The cache key is either determined by the provided resolver or by the arguments used in the memoized function.
resolverA function that determines the cache key for storing the result based on the arguments provided.
ttlsets the time to live for the cache in milliseconds. After
ttlmilliseconds, the next call to the memoized function will result in a cache miss.
Look at memoize for the non-decorator version.
Requires the experimentalDecorators flag to be set.