cache-control-midd
v0.1.1
Published
Express/Connect middleware to set response header cache options
Downloads
2
Readme
cache-control-midd
Express/Connect middleware to set response header cache options
Install
npm install cache-control-midd --save
Usage
var express = require('express');
var cacheControl = require('cache-control-midd');
var app = express();
// Sets `Cache-Control` header to `public, max-age=600` and `Expires` too
// 'minute' -> 10 minutes -> 600 seconds
app.get('/', cacheControl('minute'), function(req, res) {
res.send('ok');
});
app.listen(3000, function () {
});
cacheControl(timeValue)
see cache-header-control for details.
Run Tests
npm install
npm test