NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4304 most downloaded on npm
Simple and fast NodeJS internal caching. Node internal in memory cache like memcached.
Last release 6 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.3 years
Some releases are documented
notes for 18 of 32 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
34 releases · first in 2011
Nothing published for this version
Nothing published for this version
Add .take(key) method to get and delete a key with a single operation. #159 #160
One column per quarter.
Fixed bug where expired values were deleted even though deleteOnExpire was set to false. Thanks to fielding-wilson for #154!
Fixed bug where users could not set null values. Thanks to StefanoSega, jwest23 and marudor! #151 #152
DROP CALLBACK SUPPORT - Read the migration guide if you are currently using the callback based api! :warning:
We have dropped callback support in node-cache and you should migrate to our sync-style api!
If you cannot refactor right now, you can turn on legacy callback support by enabling the enableLegacyCallbacks option. Eg: const cache = new NodeCache({ enableLegacyCallbacks: true })
But we strongly recommend to refactor your code to use the sync-api because we will drop official callback support in Versions v6.x and onwards.
If your code currently looks like this:
cache.get("my-key", function(err, value) {
if (err) {
// ...
}
// double equal checks for null and undefined
if (value != null) {
// hmm.... nothing here :(
}
// do something with value
});
it should be rewritten to:
const value = cache.get("my-key");
// double equal checks for null and undefined
if (value != null) {
// hmm.... nothing here :(
}
// do something with value
Nothing published for this version
Nothing published for this version
Upgrade lodash to version 4.17.15 to avoid security issues
Add options.promiseValueSize for promise value. Thanks to Ryan Roemer for the pull [#84]
fix internal check interval for node < 0.10.25, thats the default node for ubuntu 14.04. Thanks to Jimmy Hwang for for the pull #78;
Added tests for different key types
string or number).del bug where trying to delete a number key resulted in no deletion at all.Fixed .ttl bug to not delete key on .ttl( key, 0 ). This is also relevant if stdTTL=0. _This causes the breaking change to 4.0.0._
.ttl bug to not delete key on .ttl( key, 0 ). This is also relevant if stdTTL=0.4.0.0.no more compiled code in the repo
0.6 and 0.8 because of failing grunt buildAdded method getTtl to get the time when a key expires. See #49
Added method getTtl to get the time when a key expires. See #49
Added option errorOnMissing to throw/callback an error o a miss during a .get( "key" ) Thanks to David Godfrey for the pull #45
errorOnMissing to throw/callback an error o a miss during a .get( "key" )- unref() the checkperiod timer - optimized travis.yml
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
added .keys() method to list all existing keys.
added .keys() method to list all existing keys.
fix for setting numeric values. Thanks to kaspars + optimized key ckeck.
fix for setting numeric values. Thanks to kaspars + optimized key ckeck.
Small change for better ttl handling
Small change for better ttl handling
Made callbacks optional. So it's now possible to use a syncron syntax. The old syntax should also work well.
Made callbacks optional.
So it's now possible to use a syncron syntax.
The old syntax should also work well.
Nothing published for this version
Added events set, del, expired and ´flush´ to nodecache to react on chaning data.
Added events set, del, expired and ´flush´ to nodecache to react on chaning data.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →