Browse Source

Merge branch 'zhudan-master'

feature/fix-isCacheableValue-usage
Bryan Donovan 10 years ago
parent
commit
b4e5a34957
  1. 7
      lib/stores/memory.js
  2. 2
      package.json

7
lib/stores/memory.js

@ -18,8 +18,13 @@ var memoryStore = function(args) {
self.set = function(key, value, options, cb) {
if (typeof options === 'function') {
cb = options;
options = {};
}
lruCache.set(key, value);
options = options || {};
var maxAge = (options.ttl || options.ttl === 0) ? options.ttl * 1000 : lruOpts.maxAge;
lruCache.set(key, value, maxAge);
if (cb) {
process.nextTick(cb);
}

2
package.json

@ -21,7 +21,7 @@
"license": "MIT",
"dependencies": {
"async": "^0.9.0",
"lru-cache": "^2.5.0"
"lru-cache": "2.6.5"
},
"devDependencies": {
"coveralls": "^2.3.0",

Loading…
Cancel
Save