Socket
Socket
Sign inDemoInstall

memcached

Package Overview
Dependencies
5
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.2.0

4

lib/connection.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc