Skip to content
Myr

refactoring

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent bf87d62 · Browse files · 2 files+0 added−38 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−38 removed

  • tests:+0 added−34 removed
  • other:+0 added−4 removed

2 files+0 added−38 removed

modified:lib/response.js-4 removed
45 unmodified lines
46 *47 * Options:48 *49 * - `maxAge` in milliseconds50 * - `maxStale` in milliseconds51 * - `minFresh` in milliseconds50 *51 * @param {String} type52 * @param {Object} options53 * @return {ServerResponse}
3 unmodified lines
57res.cache = function(type, options){58 var val = type;59 options = options || {};60 if (options.maxAge) val += ', max-age=' + (options.maxAge / 1000); 63 if (options.maxStale) val += ', max-stale=' + (options.maxStale / 1000); 64 if (options.minFresh) val += ', min-fresh=' + (options.minFresh / 1000); 61 return this.set('Cache-Control', val);62};6364/**
532 unmodified lines
modified:test/res.cache.js-34 removed