Request TTL
What do you think about returning the remaining TTL with the cache object as well?
I need to be able to say "3 minutes old" or similar, so the user knows if they should force a refresh or not.
From what I can tell, the best way (that works across all stores) is to store the request payload with the TTL information (TTL + UNIX timestamp) so that it can be returned/calculated when retrieving from the cache:
https://github.com/matteoagosti/node-request-caching/blob/master/lib/store/redis.js#L41
Make sense, I'll work on it as I would like to get this directly into the RequestCaching object rather than in the storage implementation or at least find a way to ensure the storage implementation doesn't need to think about the details of the cache object response.
That makes sense for me, and would certainly be ideal from the storage standpoint :)
Let me know how you'd like me to help!