Skip to content

Commit 0431f7c

Browse files
author
Jonathan Muller
committed
Merge branch 'release/0.3.2'
2 parents 334a960 + 13fa50e commit 0431f7c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ redisCache.store.events.on('redisError', function(error) {
4040
console.log(error);
4141
});
4242

43-
redisCache.set('foo', 'bar', ttl, function(err) {
43+
redisCache.set('foo', 'bar', { ttl: ttl }, function(err) {
4444
if (err) {
4545
throw err;
4646
}
@@ -65,7 +65,7 @@ var key = 'user_' + userId;
6565
// Note: ttl is optional in wrap()
6666
redisCache.wrap(key, function (cb) {
6767
getUser(userId, cb);
68-
}, ttl, function (err, user) {
68+
}, { ttl: ttl }, function (err, user) {
6969
console.log(user);
7070

7171
// Second time fetches user from redisCache
@@ -94,7 +94,7 @@ key2 = 'user_' + userId;
9494
ttl = 5;
9595

9696
// Sets in all caches.
97-
multiCache.set('foo2', 'bar2', ttl, function(err) {
97+
multiCache.set('foo2', 'bar2', { ttl: ttl }, function(err) {
9898
if (err) { throw err; }
9999

100100
// Fetches from highest priority cache that has the key.
@@ -110,7 +110,7 @@ multiCache.set('foo2', 'bar2', ttl, function(err) {
110110
// Note: ttl is optional in wrap()
111111
multiCache.wrap(key2, function (cb) {
112112
getUser(userId2, cb);
113-
}, ttl, function (err, user) {
113+
}, { ttl: ttl }, function (err, user) {
114114
console.log(user);
115115

116116
// Second time fetches user from memoryCache, since it's highest priority.
@@ -152,7 +152,7 @@ var redisCache = cacheManager.caching({
152152
compress: true
153153
});
154154

155-
// Or on a per command basis. (only applies to get / set commands)
155+
// Or on a per command basis. (only applies to get / set / wrap)
156156
redisCache.set('foo', 'bar', { compress: false }, function(err) {
157157
if (err) {
158158
throw err;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cache-manager-redis",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Redis store for the node-cache-manager",
55
"main": "index.js",
66
"scripts": {
@@ -22,9 +22,9 @@
2222
"author": "Dial Once",
2323
"license": "MIT",
2424
"dependencies": {
25-
"cache-manager": "^1.2.2",
25+
"cache-manager": "^2.2.0",
2626
"redis-url": "^1.2.1",
27-
"sol-redis-pool": "^0.3.1"
27+
"sol-redis-pool": "^0.3.2"
2828
},
2929
"devDependencies": {
3030
"istanbul": "^0.4.0",

0 commit comments

Comments
 (0)