apostrophe-caches-redis
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -13,2 +13,6 @@ // TODO: | ||
construct: function(self, options) { | ||
self.on('apostrophe:destroy', 'closeRedisConnection', function() { | ||
self.client.stream.removeAllListeners(); | ||
self.client.stream.destroy(); | ||
}); | ||
// Replace the apostrophe-caches implementation of getCollection in a bc way | ||
@@ -15,0 +19,0 @@ self.getCollection = function(callback) { |
{ | ||
"name": "apostrophe-caches-redis", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Redis-based cache for the Apostrophe CMS", | ||
@@ -11,3 +11,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/punkave/apostrophe-cache-redis.git" | ||
"url": "git+https://github.com/apostrophecms/apostrophe-cache-redis.git" | ||
}, | ||
@@ -22,13 +22,13 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/punkave/apostrophe-cache-redis/issues" | ||
"url": "https://github.com/apostrophecms/apostrophe-cache-redis/issues" | ||
}, | ||
"homepage": "https://github.com/punkave/apostrophe-cache-redis#readme", | ||
"homepage": "https://github.com/apostrophecms/apostrophe-cache-redis#readme", | ||
"dependencies": { | ||
"bluebird": "^3.5.1", | ||
"redis": "^2.7.1" | ||
"bluebird": "^3.5.3", | ||
"redis": "^2.8.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^3.0.0", | ||
"apostrophe": "^2.0.0" | ||
"apostrophe": "^2.75.1", | ||
"mocha": "^5.0.0" | ||
} | ||
} |
@@ -33,4 +33,1 @@ This module enhances `apostrophe-caches`, the standard caching mechanism of Apostrophe, to use Redis rather than MongoDB. | ||
## Changelog | ||
2.1.0: promise support. The `get`, `set` and `clear` methods of caches now return promises if no callback is given, matching the behavior of Apostrophe's core cache. |
@@ -10,5 +10,11 @@ var assert = require('assert'); | ||
var cache2; | ||
after(function(done) { | ||
require('apostrophe/test-lib/util').destroy(apos, done); | ||
}); | ||
it('initializes apostrophe', function(done) { | ||
this.timeout(5000); | ||
apos = require('apostrophe')({ | ||
shortName: 'apostrophe-caches-redis-test', | ||
testModule: true, | ||
@@ -182,5 +188,4 @@ modules: { | ||
it('can fetch that key within the 1-second timeout with promises', function() { | ||
return cache1.get('timeout', function(value) { | ||
return cache1.get('timeout').then(function(value) { | ||
assert(value === 'timeout'); | ||
done(); | ||
}); | ||
@@ -187,0 +192,0 @@ }); |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
13321
6
333
33
Updatedbluebird@^3.5.3
Updatedredis@^2.8.0