You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

express-redis-cache2

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-redis-cache2 - npm Package Compare versions

Comparing version

to
2.0.0-beta5

5

CHANGELOG.md
CHANGE LOG
==========
# 2.0.0-beta5
This release fixes the constructor function.
# v2.0.0-beta4
This release improves documentation.
# v2.0.0-beta3

@@ -8,0 +13,0 @@

14

lib/ExpressRedisCache.js

@@ -17,2 +17,6 @@ module.exports = (function () {

if ( !options || !options.client || typeof options.client !== 'object' ) {
return this.emit('error', new Error('Missing options.client'));
}
/** The request options

@@ -23,3 +27,3 @@ *

this.options = options || {};
this.options = options;

@@ -54,3 +58,3 @@ /** The entry name prefix

this.connected = !!this.options.client;
this.connected = false;

@@ -73,3 +77,3 @@ /** The Redis Client

this.connected = true;
this.emit('connected', { host: this.host, port: this.port });
this.emit('connected');
this.emit('message', 'OK connected to redis://' + this.client.address);

@@ -80,4 +84,4 @@ }.bind(this));

this.connected = false;
this.emit('disconnected', { host: this.host, port: this.port });
this.emit('message', 'Disconnected from redis://' + this.client.host + ':' + this.client.port);
this.emit('disconnected');
this.emit('message', 'Disconnected from redis://' + this.client.address);
}.bind(this));

@@ -84,0 +88,0 @@ }

{
"name": "express-redis-cache2",
"version": "2.0.0-beta4",
"version": "2.0.0-beta5",
"description": "A module to make Express interact with Redis (create, get, delete). You can automatically cache all your most popular routes in Redis.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -48,6 +48,6 @@ # Express Redis Cache 2

const redis = require('redis');
const createRedisCache = require('express-redis-cache2');
const createExpressRedisCache = require('express-redis-cache2');
const client = redis.createClient();
const cache = createRedisCache({ client });
const cache = createExpressRedisCache({ client });
const app = express();

@@ -158,7 +158,7 @@

const redis = require('redis');
const createRedisCache = require('express-redis-cache2');
const createExpressRedisCache = require('express-redis-cache2');
const client = redis.createClient();
// Set default prefix to "test". All entry names will begin by "test:"
const cache = createRedisCache({
const cache = createExpressRedisCache({
client,

@@ -198,7 +198,7 @@ prefix: 'test',

const redis = require('redis');
const createRedisCache = require('express-redis-cache2');
const createExpressRedisCache = require('express-redis-cache2');
const client = redis.createClient();
// Set default lifetime to 60 seconds for all entries
const cache = createRedisCache({ client, expire: 60 });
const cache = createExpressRedisCache({ client, expire: 60 });
```

@@ -205,0 +205,0 @@