Skip to content
Myr

removed `res.cache()`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

too specific

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 9af3256 · Browse files · 2 files+0 added−60 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+0 added−60 removed

  • tests:+0 added−40 removed
  • other:+0 added−20 removed

2 files+0 added−60 removed

modified:lib/response.js-20 removed
43 unmodified lines
44 return this;45};4647/**48 * Set Cache-Control to the given `type` and `options`.49 *50 * Options:51 *52 * - `maxAge` in milliseconds53 *54 * @param {String} type55 * @param {Object} options56 * @return {ServerResponse}57 * @api public58 */5960res.cache = function(type, options){61 var val = type;62 options = options || {};63 if (options.maxAge) val += ', max-age=' + (options.maxAge / 1000); 64 return this.set('Cache-Control', val);65};6667/**48 * Send a response.49 *50 * Examples:51 *
565 unmodified lines
deleted:test/res.cache.js-40 removed