mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 15:44:59 +00:00
Force EJS to cache in production
This commit is contained in:
parent
45279dc1d1
commit
478966330a
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user