Force EJS to cache in production

This commit is contained in:
Aurélien Georget 2017-01-15 17:52:20 +01:00
parent 45279dc1d1
commit 478966330a

View File

@ -35,6 +35,11 @@ module.exports = function (strapi) {
*/
initialize: cb => {
// Force cache mode in production
if (strapi.config.environment === 'production') {
strapi.config.hooks.ejs.cache = true;
}
render(strapi.app, strapi.config.hooks.ejs);
strapi.app.context.render = co.wrap(strapi.app.context.render);