cache-control-midd

0.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i cache-control-midd

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • dolymood