is-cacheable

v1.0.1
Check whether or not a HTTP response is cacheable
request cache cacheable response

is-cacheable

Build Status js-standard-style

Check whether or not a HTTP response is cacheable based in its headers.

Usage

var isCacheable = require('is-cacheable')
var request = require('request')

request('http://example.com', function (err, res, body) {
  console.log('Is response cacheable?', isCacheable(res.headers))
})

Contributing

is-cacheable is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the contribution guide for more details.

Contributors

Phillip JohnsenGitHub/phillipjTwitter/@phillipjohnsen

Credits

Got lots of inspiration from https://github.com/kevinswiber/request-caching

License

Copyright © 2015 is-cacheable contributors.

is-cacheable is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

npm i is-cacheable

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 9/26/2015

Downloads

Maintainers