memcached
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -12,3 +12,5 @@ "use strict"; | ||
function ping (host, callback) { | ||
var pong = spawn('ping', [host]); | ||
var isWin = process.platform.indexOf('win') === 0; // win32 or win64 | ||
var arg = isWin ? '-n' : '-c'; | ||
var pong = spawn('ping', [arg, '3', host]); // only ping 3 times | ||
@@ -15,0 +17,0 @@ pong.stdout.on('data', function stdoutdata (data) { |
@@ -344,3 +344,3 @@ "use strict"; | ||
S.metaData.push(query); | ||
S.write(query.command + LINEBREAK); | ||
S.write(Utils.reallocString(query.command + LINEBREAK)); | ||
}); | ||
@@ -660,10 +660,4 @@ | ||
if (S.responseBuffer.substr(S.responseBuffer.length - 2) === LINEBREAK) { | ||
S.responseBuffer = Utils.reallocString(S.responseBuffer); | ||
// Force v8 to re-allocate the responseBuffer and free the BufferStream | ||
// chunks that were appended to it. This works around an issue in v8 where | ||
// it doesn't free the appended strings which can cause poor GC behavior | ||
// and make this function very slow for larger key values. | ||
// See: https://code.google.com/p/v8/issues/detail?id=2869 | ||
S.responseBuffer = (' ' + S.responseBuffer).substr(1); | ||
var chunks = S.responseBuffer.split(LINEBREAK); | ||
@@ -670,0 +664,0 @@ |
@@ -33,3 +33,3 @@ "use strict"; | ||
if (!err && key === 'key') { | ||
for (var vKey in value) { | ||
for (var vKey=0; vKey<value.length; vKey++) { | ||
var vValue = value[vKey]; | ||
@@ -70,3 +70,3 @@ var result = validateKeySize(config, vKey, vValue); | ||
} else { | ||
args.command = args.command.replace(value, result['value']); | ||
args.command = reallocString(args.command).replace(value, result['value']); | ||
} | ||
@@ -161,1 +161,7 @@ } | ||
}; | ||
var reallocString = exports.reallocString = function(value) { | ||
// Reallocate string to fix slow string operations in node 0.10 | ||
// see https://code.google.com/p/v8/issues/detail?id=2869 for details | ||
return (' ' + value).substr(1); | ||
}; |
{ | ||
"name": "memcached", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"author": "Arnout Kazemier", | ||
@@ -26,3 +26,3 @@ "description": "A fully featured Memcached API client, supporting both single and clustered Memcached servers through consistent hashing and failover/failure. Memcached is rewrite of nMemcached, which will be deprecated in the near future.", | ||
"dependencies": { | ||
"hashring": "3.1.x", | ||
"hashring": "3.2.x", | ||
"jackpot": ">=0.0.6" | ||
@@ -29,0 +29,0 @@ }, |
@@ -32,2 +32,8 @@ # Memcached [![Build Status](https://secure.travis-ci.org/3rd-Eden/node-memcached.png?branch=master)](http://travis-ci.org/3rd-Eden/node-memcached) | ||
## Installation | ||
``` | ||
npm install memcached | ||
``` | ||
## Setting up the client | ||
@@ -459,3 +465,3 @@ | ||
contributors. See the contributors tab in Github for an up to date list of | ||
[contributors](/3rd-Eden/node-memcached/graphs/contributors). | ||
[contributors](https://github.com/3rd-Eden/memcached/graphs/contributors). | ||
@@ -462,0 +468,0 @@ Thanks for all your hard work on this project! |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
434380
3146
472
6
+ Addedhashring@3.2.0(transitive)
- Removedbindings@1.2.1(transitive)
- Removedhashring@3.1.1(transitive)
- Removednan@1.8.4(transitive)
Updatedhashring@3.2.x