node-cache icon indicating copy to clipboard operation
node-cache copied to clipboard

expire property necessary?

Open edvardchen opened this issue 9 years ago • 1 comments

Since we have kept reference of timeout handle, is it necessary to add expire as a property and check it every time we call get method? Is not obvious that it exists means it is not expired? Any other uses ?

edvardchen avatar Sep 13 '16 07:09 edvardchen

I would like to have the option to set TTL without adding a timeout function. So the cache invalidation is handled on the next get request. For that kind of purpose the expiration field would be very useful, but for now I also don't see the purpose for that, except for debugging.

karladler avatar May 17 '17 14:05 karladler