ptarjan / node-cache

A simple in-memory cache for nodejs
BSD 2-Clause "Simplified" License
1.59k stars 214 forks source link

Add 'deleteOnTimeout' configuration #114

Open isalkind opened 3 years ago

isalkind commented 3 years ago

'deleteOnTimeout' controls whether a key is removed when the ttl expires or whether it is kept. Default is true (behavior is unchanged). If set to false, key will not be removed when ttl expires, but timeout callback will be invoked.