Memoize is great, and very useful, but it would be more so if I could specify an expiration time for it, such that items that have been cached for longer than that time period get pulled again.
You can write a custom hasher that depends on time. Not a great solution though because any information still exists in memory.
And there are libraries that've been designed specifically for that: https://github.com/isaacs/async-cache . Maybe it's better to use them instead.