Allow redistogo

This commit is contained in:
John Crepezzi 2012-09-27 11:46:53 -04:00
parent ff8ef54e34
commit 4efc5d47d9
3 changed files with 16 additions and 4 deletions

View file

@ -8,9 +8,11 @@ var winston = require('winston');
// options[db] - The db to use (default 0)
// options[expire] - The time to live for each key set (default never)
var RedisDocumentStore = function(options) {
var RedisDocumentStore = function(options, client) {
this.expire = options.expire;
if (!RedisDocumentStore.client) {
if (client) {
RedisDocumentStore.client = client;
} else if (!RedisDocumentStore.client) {
RedisDocumentStore.connect(options);
}
};