Skip to content

divshot/cache-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

16 Commits

Repository files navigation

cache-control

Express/Connect middleware to set url cache options with globs

Install

npm install cache-control --save 

Usage

varexpress=require('express');varcache=require('cache-control');varapp=express();app.use(cache({'/index.html': 1000,'/none/**/*.html': false,'/private.html': 'private, max-age=300','/**': 500// Default to caching all items for 500}));app.listen(3000,function(){})

cache(options)

  • options - an object contain globs as the keys and caching declarations as the values

Run Tests

npm install npm test 

About

Express/Connect middleware to set url cache options with globs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •