mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[web] add support for pug caching when running E2E tests in dev-env (#27073)
GitOrigin-RevId: bbb53723bd1bc22db5b3d440539f1624a905341f
This commit is contained in:
@@ -134,7 +134,7 @@ app.set('views', fileURLToPath(new URL('../../views', import.meta.url)))
|
||||
app.set('view engine', 'pug')
|
||||
|
||||
if (Settings.enabledServices.includes('web')) {
|
||||
if (app.get('env') !== 'development') {
|
||||
if (Settings.enablePugCache || app.get('env') !== 'development') {
|
||||
logger.debug('enabling view cache for production or acceptance tests')
|
||||
app.enable('view cache')
|
||||
}
|
||||
|
||||
@@ -807,7 +807,10 @@ module.exports = {
|
||||
'/templates/index': '/templates/',
|
||||
},
|
||||
|
||||
reloadModuleViewsOnEachRequest: process.env.NODE_ENV === 'development',
|
||||
enablePugCache: process.env.ENABLE_PUG_CACHE === 'true',
|
||||
reloadModuleViewsOnEachRequest:
|
||||
process.env.ENABLE_PUG_CACHE !== 'true' &&
|
||||
process.env.NODE_ENV === 'development',
|
||||
|
||||
rateLimit: {
|
||||
subnetRateLimiterDisabled:
|
||||
|
||||
Reference in New Issue
Block a user