{"_id":"cache-header","_rev":"1745794","name":"cache-header","description":"Get and set the response cache header","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"time":{"modified":"2026-11-19T14:35:22.000Z","created":"2014-09-23T18:03:44.579Z","1.0.3":"2014-11-19T17:42:18.189Z","1.0.2":"2014-11-19T17:26:19.424Z","1.0.1":"2014-11-19T16:27:29.154Z","1.0.0":"2014-09-23T18:03:44.579Z"},"users":{},"author":{"name":"Scott Corgan"},"repository":{"type":"git","url":"https://github.com/scottcorgan/cache-header.git"},"versions":{"1.0.3":{"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"},"publish_time":1416418938189,"_cnpm_publish_time":1416418938189},"1.0.2":{"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"},"publish_time":1416417979424,"_cnpm_publish_time":1416417979424},"1.0.1":{"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"},"publish_time":1416414449154,"_cnpm_publish_time":1416414449154},"1.0.0":{"name":"cache-header","version":"1.0.0","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":{"chai":"^1.9.1","connect":"^3.2.0","mocha":"^1.21.4","supertest":"^0.13.0"},"gitHead":"06eadcdfe2cc1ec6395ad0f96309798e24364499","_id":"cache-header@1.0.0","_shasum":"f6eb5777aa5d9be0f297ca9d32debdf8e3dd0343","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"dist":{"shasum":"f6eb5777aa5d9be0f297ca9d32debdf8e3dd0343","tarball":"http://registry-npm.ywwl.com/cache-header/download/cache-header-1.0.0.tgz","integrity":"sha512-jy3+WeR3Vc9N0pH1ef6RAXbWVzHUq/SOxXc6EkGidNWv1Z8NzlS7CWKKVNqOAQlyaIgIMUcDVsvJvFQukFLQaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGvQ6Z/KYsnvG0fHIHqlvDcpXV6abzpwOs0ct2Tgw/8nAiBpoEZ60YzLS8qFyyukXQxSGrbXc2d7e30qSSpyz89Mfw=="}],"size":2371,"noattachment":false,"key":"/cache-header/-/cache-header-1.0.0.tgz"},"publish_time":1411495424579,"_cnpm_publish_time":1411495424579}},"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","_attachments":{},"homepage":"https://github.com/scottcorgan/cache-header","bugs":{"url":"https://github.com/scottcorgan/cache-header/issues"},"license":"MIT"}