Loading TODO +0 −1 Original line number Diff line number Diff line cache headers for static assets make redis connection into a separate method tests Loading lib/redis_document_store.js +18 −14 Original line number Diff line number Diff line Loading @@ -2,9 +2,14 @@ var redis = require('redis'); var winston = require('winston'); var hashlib = require('hashlib'); // TODO move to a different method (conn) var RedisDocumentStore = function(options) { if (!RedisDocumentStore.client) { RedisDocumentStore.connect(options); } }; // Create a connection according to config RedisDocumentStore.connect = function(options) { var host = options.host || '127.0.0.1'; var port = options.port || 6379; var index = options.db || 0; Loading @@ -18,7 +23,6 @@ var RedisDocumentStore = function(options) { winston.info('connected to redis on ' + host + ':' + port + '/' + index); } }); } }; // Save file in a key Loading Loading
TODO +0 −1 Original line number Diff line number Diff line cache headers for static assets make redis connection into a separate method tests Loading
lib/redis_document_store.js +18 −14 Original line number Diff line number Diff line Loading @@ -2,9 +2,14 @@ var redis = require('redis'); var winston = require('winston'); var hashlib = require('hashlib'); // TODO move to a different method (conn) var RedisDocumentStore = function(options) { if (!RedisDocumentStore.client) { RedisDocumentStore.connect(options); } }; // Create a connection according to config RedisDocumentStore.connect = function(options) { var host = options.host || '127.0.0.1'; var port = options.port || 6379; var index = options.db || 0; Loading @@ -18,7 +23,6 @@ var RedisDocumentStore = function(options) { winston.info('connected to redis on ' + host + ':' + port + '/' + index); } }); } }; // Save file in a key Loading