|
|
@ -15,18 +15,20 @@ var memory_store = function (args) { |
|
|
|
self.set = function (key, value, cb) { |
|
|
|
lru_cache.set(key, value); |
|
|
|
if (cb) { |
|
|
|
cb(null); |
|
|
|
process.nextTick(cb); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
self.get = function (key, cb) { |
|
|
|
cb(null, lru_cache.get(key)); |
|
|
|
process.nextTick(function () { |
|
|
|
cb(null, lru_cache.get(key)); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
self.del = function (key, cb) { |
|
|
|
lru_cache.del(key); |
|
|
|
if (cb) { |
|
|
|
cb(null); |
|
|
|
process.nextTick(cb); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|