cache-manager
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -0,1 +1,4 @@ | ||
- 1.4.0 2016-02-03 | ||
- Passing ttl of 0 to lruCache, upgrading to lru-cache 4.0.0 | ||
- 1.3.0 2016-01-26 | ||
@@ -2,0 +5,0 @@ - Promise support (#39, #24) - @PuKoren |
@@ -10,3 +10,3 @@ var Lru = require("lru-cache"); | ||
max: args.max || 500, | ||
maxAge: ttl ? ttl * 1000 : null, | ||
maxAge: (ttl || ttl === 0) ? ttl * 1000 : null, | ||
dispose: args.dispose, | ||
@@ -13,0 +13,0 @@ length: args.length, |
{ | ||
"name": "cache-manager", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Cache module for Node.js", | ||
@@ -24,3 +24,3 @@ "main": "index.js", | ||
"async": "^0.9.0", | ||
"lru-cache": "2.6.5" | ||
"lru-cache": "4.0.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "devDependencies": { |
@@ -74,6 +74,12 @@ [![build status](https://secure.travis-ci.org/BryanDonovan/node-cache-manager.png)](http://travis-ci.org/BryanDonovan/node-cache-manager) | ||
set(key, val, ttl, cb) | ||
set(key, val, {ttl: ttl}, cb) // * see note below | ||
get(key, cb) | ||
del(key, cb) | ||
// * Note that depending on the underlying store, you may be able to pass the | ||
// ttl as the third param, like this: | ||
set(key, val, ttl, cb) | ||
// ... or pass no ttl at all: | ||
set(key, val, cb) | ||
Third, node-cache-manager lets you set up a tiered cache strategy. This may be of | ||
@@ -147,4 +153,4 @@ limited use in most cases, but imagine a scenario where you expect tons of | ||
return getUserPromise(userId); | ||
}); | ||
then(function(user) { | ||
}) | ||
.then(function(user) { | ||
console.log('User:', user); | ||
@@ -151,0 +157,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128269
293
+ Addedlru-cache@4.0.0(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedyallist@2.1.2(transitive)
- Removedlru-cache@2.6.5(transitive)
Updatedlru-cache@4.0.0