node-redis-connection-pool
A node.js connection pool for Redis.
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
}, {
host: '127.0.0.1',
port: 6379
});
redisPool.init();
await redisPool.set('test-key', 'foobar');
Implemented methods
get(key)
set(key, value)
expire(key, value)
del(key)
hget(key, field)
hgetall(key)
hset(key, field, value)
hdel(key, [fields])
brpop(key)
brpoplpush(key1, key2)
blpop(key)
rpush(key, value)
lpush(key, value)
API Documentation
node-redis-connection-pool uses jsdoc-to-markdown to generate the API.md from the source code.
License
MIT