Socket
Socket
Sign inDemoInstall

redis-connection-pool

Package Overview
Dependencies
12
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    redis-connection-pool

a redis client connection pool


Version published
Maintainers
1
Install size
938 kB
Created

Readme

Source

node-redis-connection-pool

A node.js connection pool for Redis.

Build Status license downloads

About

node-redis-connection-pool is a high-level redis management object. It manages a number of connections in a pool, using them as needed and keeping all aspects of releasing active connections internal to the object, so the user does not need to worry about forgotten connections leaking resources.

NOTE Version 2.x is a rewrite and not backward compatible, please re-read the documentation to update your code.

Installation

npm install redis-connection-pool

Usage

var redisPool = require('redis-connection-pool')('myRedisPool', {
    max_clients: 10 // defalut
  }, {
    host: '127.0.0.1',
    port: 6379
  });

redisPool.init();

await redisPool.set('test-key', 'foobar');

Implemented methods

  • get
get(key)
  • set
set(key, value)
  • expire
expire(key, value)
  • del
del(key)
  • hget
hget(key, field)
  • hgetall
hgetall(key)
  • hset
hset(key, field, value)
  • hdel
hdel(key, [fields])
  • brpop
brpop(key)
  • brpoplpush
brpoplpush(key1, key2)
  • blpop
blpop(key)
  • rpush
rpush(key, value)
  • lpush
lpush(key, value)

API Documentation

node-redis-connection-pool uses jsdoc-to-markdown to generate the API.md from the source code.

License

MIT

Keywords

FAQs

Last updated on 24 Mar 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc