memoizeWithExpiration
Creates a time-based expiration memoized version of the receiver function.
Return
A function that caches results for previously used inputs, with an expiration time.
Parameters
T
The input type for the function.
R
The output type of the function.
expirationTimeMs
The time in milliseconds after which the cache entry expires.