From f90580e733ff461627c6e2eaf89522671a308db4 Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Thu, 31 Oct 2013 07:37:46 -0700 Subject: [PATCH] Fixing unreleased connection in redis example --- History.md | 3 +++ examples/redis_example/redis_store.js | 3 ++- package.json | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index c858854..4acbf16 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,6 @@ +- 0.1.2.1 2013-10-31 + Fixing unreleased connection in redis example. + - 0.1.2 2013-10-13 Wrapping synchronous memory cache callbacks in process.nextTick() for the purists. diff --git a/examples/redis_example/redis_store.js b/examples/redis_example/redis_store.js index 436d54b..ef39dfb 100644 --- a/examples/redis_example/redis_store.js +++ b/examples/redis_example/redis_store.js @@ -39,7 +39,8 @@ function redis_store(args) { if (err) { return cb(err); } conn.get(key, function (err, result) { - if (err) { pool.release(conn); return cb(err); } + pool.release(conn); + if (err) { return cb(err); } cb(null, JSON.parse(result)); }); }); diff --git a/package.json b/package.json index d9af53f..d7b1903 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cache-manager", - "version": "0.1.2", + "version": "0.1.2.1", "description": "Cache module for Node.js", "main": "index.js", "scripts": { @@ -12,6 +12,7 @@ }, "keywords": [ "cache", + "redis", "lru-cache", "memory cache", "multiple cache"