memcaching
Advanced tools
Comparing version 0.0.4 to 0.1.0
@@ -36,3 +36,2 @@ var MemcacheSocket = require('./memcachesocket') | ||
} | ||
params = this.parseParams(params) | ||
this.run(params.key, params, cb) | ||
@@ -44,4 +43,3 @@ } | ||
return function(key, cb) { | ||
var params = this.parseParams({ verb: verb, keys: key }) | ||
this.run(key, params, function(err, response) { | ||
this.run(key, { verb: verb, keys: key }, function(err, response) { | ||
if (err) return cb(err) | ||
@@ -61,5 +59,5 @@ cb(null, response.length > 0 ? response[0].slice(1) : response[0]) | ||
var params = me.parseParams({ verb: verb, keys: keys }) | ||
this.pool.use(params.keys, function(socket, keys) { | ||
socket.execute({ verb: verb, keys: keys }, function(err, response) { | ||
this.pool.use(keys, function(socket, keys) { | ||
var params = me.parseParams({ verb: verb, keys: keys }) | ||
socket.execute(params, function(err, response) { | ||
if (err) error = null | ||
@@ -83,4 +81,6 @@ else results = results.concat(response) | ||
MemcacheClient.prototype = { | ||
// only suitable for single-key methods | ||
run: function(key, params, cb) { | ||
this.pool.use(key, function(socket, keys) { | ||
params = this.parseParams(params) | ||
this.pool.use(key, function(socket) { | ||
socket.execute(params, cb) | ||
@@ -87,0 +87,0 @@ }) |
{ | ||
"name": "memcaching", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"description": "Library to speak the memcache text protocol", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
44936
35
1372