{"name":"cache-header","version":"1.0.3","description":"Get and set the response cache header","main":"index.js","scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"https://github.com/scottcorgan/cache-header.git"},"keywords":["headers","cache","caching","express","connect"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/cache-header/issues"},"homepage":"https://github.com/scottcorgan/cache-header","dependencies":{"lodash.isnumber":"^2.4.1","lodash.isstring":"^2.4.1","regular":"^0.1.6"},"devDependencies":{"connect":"^3.2.0","mocha":"^1.21.4","supertest":"^0.13.0"},"gitHead":"a55ec1aa790e7a1036c519c56742873cfcad6201","_id":"cache-header@1.0.3","_shasum":"d1c4e29a969aa5781edfb90ed2ca539061506838","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.31","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"dist":{"shasum":"d1c4e29a969aa5781edfb90ed2ca539061506838","tarball":"http://registry-npm.ywwl.com/cache-header/download/cache-header-1.0.3.tgz","integrity":"sha512-Hq9wHnINwWLby8+Q1BNiH3bTrnkT1fRNJtff7SmAe2bnN/gfT+YOri48rVKnAPF8FqTN30bYm6ciLX02JJdPXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAz53iXAHS6dc+UPKU/wIUVi0g+kBTv0d4R5FXoVF6oRAiBNqgY0uJVdaXgjZ3d0GTi6ASOW/G6FgAnDUb2CoOXtpw=="}],"size":2353,"noattachment":false,"key":"/cache-header/-/cache-header-1.0.3.tgz"},"readme":"# cache-header\n\nGet and set the response cache header\n\n## Install\n\n```\nnpm install cache-header --save\n```\n\n## Usage\n\n```js\nvar express = require('express');\nvar cacheHeader = require('cache-header');\n\nvar app = express();\n\napp.use(function (req, res, next) {\n  // Sets Cache-Control header to public, max-age=10000\n  cacheHeader(res, 10000);\n  next();\n});\n\napp.listen(3000, function () {\n  \n});\n```\n\n### cacheHeader(responseObject, headerValue)\n\n* `responseObject` - the response object passed through by Node\n* `headerValue` - value to set the header to. Can be the following types:\n  * `false` - sets value to `no-cache`\n  * `number` - a number or a parseable string. Sets header to `public, max-age={number}`\n  * `string` - sets the header to whatever the string is\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```\n","publish_time":1416418938189,"_cnpm_publish_time":1416418938189,"dist-tags":{"latest":"1.0.3"}}