cache-service
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -108,21 +108,2 @@ var cacheModule = require('./cacheModule'); | ||
// this.cache.mset = function(obj, cb){ | ||
// this.log(false, 'Attempting to mset data:', {data: obj}); | ||
// var arr = []; | ||
// for(key in obj){ | ||
// if(obj.hasOwnProperty(key)){ | ||
// var value = obj[key]; | ||
// try { | ||
// value = JSON.stringify(value); | ||
// } catch (err) { | ||
// //Do nothing | ||
// } | ||
// arr.push(key); | ||
// arr.push(value); | ||
// } | ||
// } | ||
// cb = cb || noop; | ||
// this.db.mset(arr, cb); | ||
// } | ||
this.cache.mset = function(obj, expiration, cb){ | ||
@@ -129,0 +110,0 @@ this.log(false, 'Attempting to msetex data:', {data: obj}); |
@@ -127,11 +127,4 @@ var cacheCollection = require('./cacheCollection'); | ||
var obj = arguments[0]; | ||
var expiration = null; | ||
var cb = null; | ||
if(arguments.length === 3){ | ||
expiration = arguments[1]; | ||
cb = arguments[2]; | ||
} | ||
else if(arguments.length === 2){ | ||
cb = arguments[1]; | ||
} | ||
var expiration = arguments[1] || null; | ||
var cb = arguments[2] || null; | ||
for(var i = 0; i < self.cacheCollection.preApi.length; i++){ | ||
@@ -138,0 +131,0 @@ var cache = self.cacheCollection.preApi[i]; |
{ | ||
"name": "cache-service", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "A tiered caching solution for node.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -171,3 +171,3 @@ var expect = require('expect'); | ||
it('.mset() x 50', function (done) { | ||
speedTest.mset(list, function(){ | ||
speedTest.mset(list, null, function(){ | ||
setTimeout(function(){ | ||
@@ -174,0 +174,0 @@ done(); |
39470
888