Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

memcache-plus

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memcache-plus - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

22

lib/client.js

@@ -92,2 +92,24 @@ /**

/**
* disconnect() - Iterate over all hosts, disconnect from each.
*
* @api private
*/
Client.prototype.disconnect = function() {
debug('starting disconnection');
var connectionKeys = R.keys(this.connections);
connectionKeys.map(function(ckey) {
debug('disconnecting from %s', ckey);
this.connections[ckey].disconnect();
}.bind(this));
this.connections = {};
// Fair to assume if client is requesting a disconnect, they don't want
// it to just reconnect
this.reconnect = false;
return Promise.resolve(null);
};
/**
* getHostList() - Given a list of hosts, contact them via Elasticache

@@ -94,0 +116,0 @@ * autodiscover and retrieve the list of hosts

2

package.json
{
"name": "memcache-plus",
"version": "0.2.6",
"version": "0.2.7",
"description": "Better memcache for node",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,2 +43,16 @@ require('chai').should();

it('has a disconnect method', function(done) {
var cache = new Client();
cache.should.have.property('disconnect');
cache.disconnect.should.be.a('function');
_.sample(cache.connections).client.on('connect', function() {
cache.disconnect()
.then(function() {
cache.connections.should.be.an('object');
_.keys(cache.connections).should.have.length(0);
})
.then(done);
});
});
it('has a dictionary of connections', function() {

@@ -45,0 +59,0 @@ var cache = new Client();

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc