Skip to content
Myr

Setting res.render() cache to true in production

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 d3090c0 · Browse files · 2 files+7 added−2 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+7 added−2 removed

  • other:+7 added−2 removed

2 files+7 added−2 removed

modified:lib/express/server.js+2 added-2 removed
modified:lib/express/view.js+5 added
97 unmodified lines
98 layout = layout === true99 ? 'layout' + ext100 : layout;101102 // Auto-cache in production103 if (this.app.set('env') === 'production') {104 options.cache = true;105 }106107 // Always expose partial() as a local108 options.locals = options.locals || {};109 options.locals.partial = function(){110 self.partial.apply(self, arguments);
55 unmodified lines