Wrap a function with memo to get a function back that automagically returns values that have already been calculated.
Expiration
You can optionally pass a ttl (time to live) that will expire memoized results. In versions prior to version 10, ttl had a value of 300 milliseconds if not specified.
Key Function
You can optionally customize how values are stored when memoized.