ptarjan/node-cache — pull request #5 by berryboy (2012-06-12 14:17:22+00:00)
Title: Cancel timeout after put a new value

When a new value has been push to a key, the timeout event linked with the key must be clear or reset. Otherwise, the new value will be remove by unintentional timeout event.

cache.put('foo', 'bar', 200);
...
cache.put('foo', 'xxx' ); // this should create a persist key/value

// after 200ms cache.get('foo') is null