codebutcher/node.cacheio — pull request #1 by penartur (2012-05-03 11:07:58+00:00)
Title: Various improvements of the expiration-related functionality

- Fixed a bug in `cacheCleanup`: previously, it only removed entries which are more than `cacheTTL` old, irrespective of whether the entry contains positive or negative response;
- Detection of whether the cache entry is expired or not is moved from `cacheCleanup` and `getCached` to a separate `isExpired` function;
- Implemented `cacheExpires` and `negativeExpires` options. It seems more useful to be able to set expiration limits (i.e. when the data retrieved from some eternal source becomes obsolete and needs to be reloaded) than TTL ones (i.e. when the data seems to be not needed anymore and might be removed, releasing the RAM).