Commit a4eda8c2 authored by Kevin Ludwig's avatar Kevin Ludwig

add namespace for del, incrdecr commands, issue-111

parent 6ffa0b62
......@@ -1004,9 +1004,10 @@ Client.config = {
// Small handler for incr and decr's
privates.incrdecr = function incrdecr(type, key, value, callback) {
var fullkey = this.namespace + key;
this.command(function incredecrCommand(noreply) {
return {
key: key
key: fullkey
, callback: callback
, value: value
, validate: [
......@@ -1016,7 +1017,7 @@ Client.config = {
]
, type: type
, redundancyEnabled: true
, command: [type, key, value].join(' ') +
, command: [type, fullkey, value].join(' ') +
(noreply ? NOREPLY : '')
};
});
......@@ -1028,9 +1029,10 @@ Client.config = {
// Deletes the keys from the servers
memcached.del = function del(key, callback){
var fullkey = this.namespace + key;
this.command(function deleteCommand(noreply) {
return {
key: key
key: fullkey
, callback: callback
, validate: [
['key', String]
......@@ -1038,7 +1040,7 @@ Client.config = {
]
, type: 'delete'
, redundancyEnabled: true
, command: 'delete ' + key +
, command: 'delete ' + fullkey +
(noreply ? NOREPLY : '')
};
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment