cache-middleware

cache-middleware JS library on npm Download cache-middleware JS library

Cache middleware in redis

Version 0.0.3 License ISC Vulnerabilities 0
cache-middleware has no homepage
cache-middleware JS library on GitHub
cache-middleware JS library on npm
Download cache-middleware JS library

Cache middleware in Redis

Note: This package is no longer actively maintained. At this time it's being downloaded around ~60 times per month. This will probably be the last version I release.

This middleware caches server responses in Redis. If you are using RedisToGo on Heroku this will automatically default to that, otherwise it will try and connect to a local Redis instance.

Install

npm install --save cache-middleware

Usage


var express = require('express'),
    cache = require('cache-middleware'),
    otherMiddlewareThatTakesForever = require('other-middleware'),
    app = express();

app.use(cache('otherMiddleware', otherMiddlewareThatTakesForever, 86400));