cache-manager
Advanced tools
Comparing version 0.7.1 to 0.8.0
@@ -0,1 +1,4 @@ | ||
- 0.8.0 2014-07-07 | ||
Adding setex() (Thanks evanlucas) | ||
- 0.7.1 2014-06-15 | ||
@@ -2,0 +5,0 @@ Adding link to Express.js cache-manager example app |
@@ -61,2 +61,6 @@ /*jshint maxcomplexity:10*/ | ||
if (typeof self.store.setex === 'function') { | ||
self.setex = self.store.setex.bind(self.store); | ||
} | ||
if (typeof self.store.reset === 'function') { | ||
@@ -63,0 +67,0 @@ self.reset = self.store.reset.bind(self.store); |
{ | ||
"name": "cache-manager", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"description": "Cache module for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -150,2 +150,24 @@ // TODO: These are really a mix of unit and integration tests. | ||
describe("setex()", function () { | ||
var fake_store; | ||
beforeEach(function () { | ||
fake_store = { | ||
get: function () {}, | ||
set: function () {}, | ||
del: function () {}, | ||
setex: function () {} | ||
}; | ||
sinon.stub(fake_store, 'setex'); | ||
cache = caching({store: fake_store}); | ||
}); | ||
it("passes the params to the underlying store's setex() method", function () { | ||
cache.setex('foo', 'bar', 'blah'); | ||
assert.ok(fake_store.setex.calledWith('foo', 'bar', 'blah')); | ||
}); | ||
}); | ||
describe("keys()", function () { | ||
@@ -152,0 +174,0 @@ var key_count; |
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
68433
1364