fwsp-cacher
Advanced tools
Comparing version 1.0.2 to 1.0.3
15
index.js
'use strict'; | ||
const Promise = require('bluebird'); | ||
const redis = require('redis'); | ||
const utils = require('fwsp-jsutils'); | ||
const RedisConnection = require('fwsp-redis-connection'); | ||
@@ -35,11 +35,6 @@ /** | ||
openDB() { | ||
let db = redis.createClient( | ||
this.config.port, | ||
this.config.url, | ||
null); | ||
return new Promise((resolve, reject) => { | ||
db.select(this.config.db, (err, reply) => { | ||
(err) ? reject(err) : resolve(db); | ||
}); | ||
}); | ||
let retryStrategy = this.config.retry_strategy; | ||
delete this.config.retry_strategy; | ||
let redisConnection = new RedisConnection(this.config); | ||
return redisConnection.connect(retryStrategy) | ||
} | ||
@@ -46,0 +41,0 @@ |
{ | ||
"name": "fwsp-cacher", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A caching module for use with Node and Redis", | ||
@@ -24,5 +24,5 @@ "author": { | ||
"dependencies": { | ||
"bluebird": "^3.3.5", | ||
"fwsp-jsutils": "1.0.8", | ||
"redis": "^2.6.0-2" | ||
"bluebird": "3.5.0", | ||
"fwsp-jsutils": "1.0.10", | ||
"fwsp-redis-connection": "0.0.3" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
# Cacher | ||
[](https://badge.fury.io/js/fwsp-cacher) <span class="badge-npmdownloads"><a href="https://npmjs.org/package/fwsp-cacher" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/fwsp-cacher.svg" alt="NPM downloads" /></a></span> []() []() | ||
A simple module for caching using Redis. | ||
@@ -3,0 +6,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16299
88
292
1
+ Addedfwsp-redis-connection@0.0.3
+ Addedbluebird@3.5.0(transitive)
+ Addedfwsp-jsutils@1.0.10(transitive)
+ Addedfwsp-redis-connection@0.0.3(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedredis@2.7.0(transitive)
+ Addedredis-url@1.2.1(transitive)
- Removedredis@^2.6.0-2
- Removedbluebird@3.7.2(transitive)
- Removedfwsp-jsutils@1.0.8(transitive)
- Removedredis@2.8.0(transitive)
Updatedbluebird@3.5.0
Updatedfwsp-jsutils@1.0.10