cache-manager
Advanced tools
Comparing version 2.1.2 to 2.2.0
@@ -0,3 +1,6 @@ | ||
- 2.2.0 2016-10-19 | ||
- Adding multi_caching.reset() (#63) - @disjunction | ||
- 2.1.2 2016-06-08 | ||
- Checking that callback array exists before iterating over it (#69). | ||
- Checking that callback array exists before iterating over it (#57). | ||
@@ -8,3 +11,3 @@ - 2.1.1 2016-05-24 | ||
- 2.1.0 2016-05-24 | ||
- Allow passing in a promise dependency (#55). -@siddharthkchatterjee | ||
- Allow passing in a promise dependency (#55). - @siddharthkchatterjee | ||
@@ -11,0 +14,0 @@ - 2.0.1 2016-04-18 |
@@ -321,2 +321,16 @@ /** @module cacheManager/multiCaching */ | ||
/** | ||
* Reset all caches. | ||
* | ||
* @function | ||
* @name reset | ||
* | ||
* @param {function} cb | ||
*/ | ||
self.reset = function(cb) { | ||
async.each(caches, function(cache, next) { | ||
cache.store.reset(next); | ||
}, cb); | ||
}; | ||
return self; | ||
@@ -323,0 +337,0 @@ }; |
{ | ||
"name": "cache-manager", | ||
"version": "2.1.2", | ||
"version": "2.2.0", | ||
"description": "Cache module for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -44,2 +44,4 @@ [![build status](https://secure.travis-ci.org/BryanDonovan/node-cache-manager.png)](http://travis-ci.org/BryanDonovan/node-cache-manager) | ||
* [node-cache-manager-memcached-store](https://github.com/theogravity/node-cache-manager-memcached-store) | ||
## Overview | ||
@@ -46,0 +48,0 @@ |
@@ -42,3 +42,3 @@ var assert = require('assert'); | ||
describe("get(), set(), del()", function() { | ||
describe("get(), set(), del(), reset()", function() { | ||
var value; | ||
@@ -271,2 +271,28 @@ | ||
}); | ||
describe("reset()", function() { | ||
it("resets all caches", function(done) { | ||
multiCache.set(key, value, function(err) { | ||
checkErr(err); | ||
multiCache.reset(function() { | ||
memoryCache.get(key, function(err, result) { | ||
checkErr(err); | ||
assert.ok(!result); | ||
memoryCache2.get(key, function(err, result) { | ||
checkErr(err); | ||
assert.ok(!result); | ||
memoryCache3.get(key, function(err, result) { | ||
checkErr(err); | ||
assert.ok(!result); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -273,0 +299,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
135926
2893
314