From 3b1a5c458e15998b3b3d6d9b5a11e1071741e4aa Mon Sep 17 00:00:00 2001 From: nate stemen Date: Mon, 30 Mar 2020 14:12:56 -0400 Subject: [PATCH] Merge pull request #2699 from overleaf/jpa-test-perf [perf] enable view caching for acceptance tests GitOrigin-RevId: 696958a617392d20b594141aa316b5a80755ff38 --- services/web/app/src/infrastructure/Server.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/web/app/src/infrastructure/Server.js b/services/web/app/src/infrastructure/Server.js index cafa05a7e7..b9798e73f6 100644 --- a/services/web/app/src/infrastructure/Server.js +++ b/services/web/app/src/infrastructure/Server.js @@ -234,6 +234,10 @@ if (enableWebRouter || notDefined(enableWebRouter)) { logger.info('precompiling views for web in production environment') Views.precompileViews(app) } + if (app.get('env') === 'test') { + logger.info('enabling view cache for acceptance tests') + app.enable('view cache') + } app.use(publicApiRouter) // public API goes with web router for public access app.use(Validation.errorMiddleware)