New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redis-quick-callback

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-quick-callback

A redis client that callback immediately when no connection is present.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by250%
Maintainers
1
Weekly downloads
 
Created
Source

redis-quick-callback

An enhancement to mranney/node-redis that calls back immediately when no connection is present. When a connection is lost, node-redis client takes anywhere between 200ms to 2500ms to callback. One way around this to turn off enable_offline_queue and loose the awesome offline queuing functionality. This client calls back immediately and executes the command asynchronously.

Usage

Create a new client using the same API as mranney/node-redis

var redis = require('redis-quick-callback');
var client = redis.createClient();
client.on('ready', function () {
  // when no connection exists
  client.set('key', 'value', function (err) {
    console.log(err); // Err: No connection to server
  });

  // redis connection is back
  client.get('key', function (err, data) {
    console.log(data); // 'value'
  });

});

Build and Test

The code can be built using gulp as follows

$ gulp 

Tests require redis to be running at localhost:6379

Run tests using

$ npm test

Keywords

FAQs

Package last updated on 25 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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