function RedisPool( | uid, | | cfg | ) |
|
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 memory and building up over time.
Parameters
uid | (string) - Unique identifer to retreive an existing instance from elsewhere in an application. If left undefined, one will be generate automatically and avaialble via the `UID` property of the returned object. |
cfg | (object) - A series of configuration parameters to be optionally passed in and used during initialization of the object. |
cfg.HOST | (string) - Redis host (default: ‘127.0.0.1’) |
cfg.PORT | (number) - Redis port (default: 6379) |
cfg.MAX_CLIENTS | (number) - Max clients alive in the connection pool at once. (default: 30) |
cfg.PERFORM_CHECKS | (boolean) - Perform a series of redis checks, currently this checks to to see if blocking push/pops can be used. (default: false) |
Returns
A redisPool object