{"name":"cache-header","version":"1.0.1","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":"82ad6a31475721b3b2e726a6ce8f81cc14548dac","_id":"cache-header@1.0.1","_shasum":"586f84967a2497973b94a24d6aa77f65af70b307","_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":"586f84967a2497973b94a24d6aa77f65af70b307","tarball":"http://registry-npm.ywwl.com/cache-header/download/cache-header-1.0.1.tgz","integrity":"sha512-xmclDiHnV11m0ypPrdmWl561r9OEjYIsVHUGT5N/dCE5Tz2lEliJIFwixheHK/poihXwYUVJ0l3zi7XMRmjpOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+gBvsWbWbEcncmPGLeif31lD9Uifh6+A/L0fpHctXJwIgIb9vATGjXg1/25qV5WCzVR969cYdFHnGprh8Dwx9acQ="}],"size":2348,"noattachment":false,"key":"/cache-header/-/cache-header-1.0.1.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":1416414449154,"_cnpm_publish_time":1416414449154,"dist-tags":{"latest":"1.0.3"}}