cachecache

1.0.3 • Public • Published

cachecache

Connect middleware to preemptively handle requests containing If-None-Match and If-Modified-Since headers.

By default, Express will return 304s for dynamic content, but only after it has been regenerated. This caches response headers (but not bodies) to allow 304s to be sent without potentially-costly content regeneration.

Usage

npm install --save cachecache
var app = require("express")();
 
app.use(require("cachecache")({
  max: 1000000 // maximum number of entries in the underlying LRU cache;
               // default value
});
 
// ...

Readme

Keywords

none

Package Sidebar

Install

npm i cachecache

Weekly Downloads

29

Version

1.0.3

License

ISC

Unpacked Size

1.68 kB

Total Files

3

Last publish

Collaborators

  • mojodna