mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 22:50:46 +02:00
Merge pull request #30244 from overleaf/bg-add-missing-configuration-for-pdf-caching
add missing configuration for pdf caching GitOrigin-RevId: b5791d5d6db7fc9e970acaa0ca9cc43e1a7ca8ec
This commit is contained in:
@@ -32,6 +32,7 @@ import Features from '../../infrastructure/Features.mjs'
|
||||
import BrandVariationsHandler from '../BrandVariations/BrandVariationsHandler.mjs'
|
||||
import UserController from '../User/UserController.mjs'
|
||||
import AnalyticsManager from '../Analytics/AnalyticsManager.mjs'
|
||||
import LocalsHelper from '../SplitTests/LocalsHelper.mjs'
|
||||
import SplitTestHandler from '../SplitTests/SplitTestHandler.mjs'
|
||||
import SplitTestSessionHandler from '../SplitTests/SplitTestSessionHandler.mjs'
|
||||
import FeaturesUpdater from '../Subscription/FeaturesUpdater.mjs'
|
||||
@@ -581,6 +582,18 @@ const _ProjectController = {
|
||||
})
|
||||
)
|
||||
|
||||
// PDF caching, these tests are archived but we are keeping the frontend code unchanged for now
|
||||
LocalsHelper.setSplitTestVariant(
|
||||
res.locals,
|
||||
'pdf-caching-cached-url-lookup',
|
||||
Settings.cachedUrlLookupEnabled ? 'enabled' : 'disabled'
|
||||
)
|
||||
LocalsHelper.setSplitTestVariant(
|
||||
res.locals,
|
||||
'pdf-caching-mode',
|
||||
Settings.pdfCachingMode ? 'enabled' : 'disabled'
|
||||
)
|
||||
|
||||
const brandVariation = project?.brandVariationId
|
||||
? await BrandVariationsHandler.promises.getBrandVariationById(
|
||||
project.brandVariationId
|
||||
|
||||
@@ -703,10 +703,6 @@ module.exports = {
|
||||
// By default turn on feature flag, can be overridden per request.
|
||||
enablePdfCaching: process.env.ENABLE_PDF_CACHING === 'true',
|
||||
|
||||
pdfCachingMinChunkSize: 7500,
|
||||
pdfCaching: true,
|
||||
cachedUrlLookupEnabled: true,
|
||||
|
||||
// Maximum size of text documents in the real-time editing system.
|
||||
max_doc_length: 2 * 1024 * 1024, // 2mb
|
||||
|
||||
|
||||
Reference in New Issue
Block a user