4.0.1 • Published 2 years ago

redis-connection-pool v4.0.1

Weekly downloads
462
License
MIT
Repository
github
Last release
2 years ago

redis-connection-pool

A node.js connection pool for Redis.

https://silverbucket.github.io/redis-connection-pool

Build Status license downloads

About

A high-level redis connection pooling 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.

Installation

npm install redis-connection-pool

Usage

import redisPoolFactory from 'redis-connection-pool';
const redisPool = await redisPoolFactory('myRedisPool', {
    max_clients: 5, // default
    redis: {
      url: 'redis://localhost:6379'
    }
  });


await redisPool.set('test-key', 'foobar');
const foo = await redisPool.get('test-key');
// returns 'foobar'

Or you can create a pool instance directly

import RedisConnectionPool from 'redis-connection-pool';
const redisPool = new RedisConnectionPool();
await redisPool.init();

When you are done

redisPool.shutdown();

Implemented Redis methods

  • blpop
  • brpop
  • del
  • expire
  • get
  • hdel
  • hget
  • hgetall
  • hset
  • incr
  • keys
  • lpush
  • rpush
  • sendCommand
  • set
  • ttl

Additional methods

  • init
  • shutdown

API Documentation

For the full documentation on the RedisConnectionPool class, see https://silverbucket.github.io/redis-connection-pool/classes/RedisConnectionPool.html

License

MIT

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

2.0.3

2 years ago

2.0.4

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.7.3

3 years ago

1.7.4

3 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago