Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redis-connection-pool

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-connection-pool - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"name": "redis-connection-pool",
"version": "0.0.4",
"version": "0.0.5",
"description": "Redis client connection pool",

@@ -5,0 +5,0 @@ "license": "AGPL",

@@ -39,2 +39,7 @@ node-redis-connection-pool

* **expire**
```
expire(key, value)
```
* **hget**

@@ -41,0 +46,0 @@ ```

@@ -129,2 +129,17 @@ /**

/**
* Function: expire
*
* Execute a redis EXPIRE command
*
* Parameters:
*
* key - (string) - A key to assign value to
* value - (number) - TTL in seconds
*
*/
RedisConnectionPool.prototype.expire = function (key, data) {
redisSingle.apply(this, ['expire', key, data]);
};
/**
* Function: set

@@ -336,8 +351,14 @@ *

function redisSingle (funcName, key) {
function redisSingle (funcName, key, val) {
var pool = this.pool;
pool.acquire(function (err, client) {
client[funcName](key, function () {
pool.release(client);
});
if (val) {
client[funcName](key, val, function () {
pool.release(client);
});
} else {
client[funcName](key, function () {
pool.release(client);
});
}
});

@@ -344,0 +365,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc