{"name":"cache-header","version":"1.0.2","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":"16b4a9e1bf71fdacb34dad552ee4e30d6b709af4","_id":"cache-header@1.0.2","_shasum":"a909dad49d9b93ac2a2f68086a1c8b9838add7c5","_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":"a909dad49d9b93ac2a2f68086a1c8b9838add7c5","tarball":"http://registry-npm.ywwl.com/cache-header/download/cache-header-1.0.2.tgz","integrity":"sha512-KZYKY9lkiEbacNT8dzjjtptykpivQ55cG0I+idjm30oNp8vk/lpwZ6Uflfm5hgRV31+RRGRc87+2Kjg3tI2hZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBaCQploJl83stYT/USrJOWluUUUjGxSI0wTKzI3oeZAiEA7hsl4OKti5EzTlnlPr3jbK2rtweHRQVt/WWkW+Sn3+w="}],"size":2353,"noattachment":false,"key":"/cache-header/-/cache-header-1.0.2.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":1416417979424,"_cnpm_publish_time":1416417979424,"dist-tags":{"latest":"1.0.3"}}