Skip to content

Commit

Permalink
Merge branch 'release/0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Muller committed Nov 15, 2016
2 parents 334a960 + 13fa50e commit 0431f7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ redisCache.store.events.on('redisError', function(error) {
console.log(error);
});

redisCache.set('foo', 'bar', ttl, function(err) {
redisCache.set('foo', 'bar', { ttl: ttl }, function(err) {
if (err) {
throw err;
}
Expand All @@ -65,7 +65,7 @@ var key = 'user_' + userId;
// Note: ttl is optional in wrap()
redisCache.wrap(key, function (cb) {
getUser(userId, cb);
}, ttl, function (err, user) {
}, { ttl: ttl }, function (err, user) {
console.log(user);

// Second time fetches user from redisCache
Expand Down Expand Up @@ -94,7 +94,7 @@ key2 = 'user_' + userId;
ttl = 5;

// Sets in all caches.
multiCache.set('foo2', 'bar2', ttl, function(err) {
multiCache.set('foo2', 'bar2', { ttl: ttl }, function(err) {
if (err) { throw err; }

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

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

// Or on a per command basis. (only applies to get / set commands)
// Or on a per command basis. (only applies to get / set / wrap)
redisCache.set('foo', 'bar', { compress: false }, function(err) {
if (err) {
throw err;
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cache-manager-redis",
"version": "0.3.1",
"version": "0.3.2",
"description": "Redis store for the node-cache-manager",
"main": "index.js",
"scripts": {
Expand All @@ -22,9 +22,9 @@
"author": "Dial Once",
"license": "MIT",
"dependencies": {
"cache-manager": "^1.2.2",
"cache-manager": "^2.2.0",
"redis-url": "^1.2.1",
"sol-redis-pool": "^0.3.1"
"sol-redis-pool": "^0.3.2"
},
"devDependencies": {
"istanbul": "^0.4.0",
Expand Down

0 comments on commit 0431f7c

Please sign in to comment.