🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

redisp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redisp

A redis connection factory with a simplistic API and built-in support for pooling.

latest
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

redisp

Build Status npm version

How to install

npm install redisp --save

redisp is a connection factory for redis with a built-in support for pooling.

How to use

var pool = require('redisp')();

//creates a dedicated client connection
pool.create(function(err, conn) {

});

//retrieves a client connection from the pool
pool.borrow(function(err, conn) {
  //operations here
  conn.release(); //return this client connection into the pool
});

Options

var pool = require('redisp')(opts);

List of available options:

  • host: host to connect redis on (127.0.0.1)
  • port: port to connect redis on (6379)
  • password: password used in authentication ('')
  • maxConnections: maximum number of connections that can be held in the connection pool. If maxConnections is reached, new calls to pool.borrow will be blocked until a client connection is released.

All other options are the same as in redis.

License

MIT

FAQs

Package last updated on 20 Apr 2015

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