diff --git a/src/config/nunchucks.ts b/src/config/nunchucks.ts index 23a02dc66..6457799c5 100644 --- a/src/config/nunchucks.ts +++ b/src/config/nunchucks.ts @@ -3,6 +3,8 @@ import * as nunjucks from "nunjucks"; import { Environment } from "nunjucks"; import i18next from "i18next"; import { returnLastCharactersOnly } from "../utils/phone-number"; +import { getNodeEnv } from "../config"; +import { ENVIRONMENT_NAME } from "../app.constants"; export function configureNunjucks( app: express.Application, @@ -11,7 +13,7 @@ export function configureNunjucks( const nunjucksEnv: nunjucks.Environment = nunjucks.configure(viewsPath, { autoescape: true, express: app, - noCache: true, + noCache: getNodeEnv() !== ENVIRONMENT_NAME.PROD, }); nunjucksEnv.addFilter("translate", function (key: string, options?: any) {