mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[web] pre-populate clsi-cache ahead of showing survey (#29221)
* [web] pre-populate clsi-cache ahead of showing survey * [web] tweak variant checks Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com> --------- Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com> GitOrigin-RevId: 749a7a1c3b21ef2e46bc86a74631e004069c5806
This commit is contained in:
@@ -172,7 +172,14 @@ async function prepareClsiCache(
|
||||
userId,
|
||||
'populate-clsi-cache'
|
||||
)
|
||||
if (variant !== 'enabled') return
|
||||
if (variant !== 'enabled') {
|
||||
// Pre-populate the cache for the users in the split-test for prompts.
|
||||
const { variant } = await SplitTestHandler.promises.getAssignmentForUser(
|
||||
userId,
|
||||
'populate-clsi-cache-for-prompt'
|
||||
)
|
||||
if (variant !== 'enabled') return
|
||||
}
|
||||
|
||||
const features = await UserGetter.promises.getUserFeatures(userId)
|
||||
if (features.compileGroup !== 'priority') return
|
||||
|
||||
@@ -73,9 +73,20 @@ async function _getSplitTestOptions(req, res) {
|
||||
res,
|
||||
'populate-clsi-cache'
|
||||
)
|
||||
const populateClsiCache = populateClsiCacheVariant === 'enabled'
|
||||
let populateClsiCache = populateClsiCacheVariant === 'enabled'
|
||||
const compileFromClsiCache = populateClsiCache // use same split-test
|
||||
|
||||
if (!populateClsiCache) {
|
||||
// Pre-populate the cache for the users in the split-test for prompts.
|
||||
// Keep the compile from cache disabled for now.
|
||||
const { variant } = await SplitTestHandler.promises.getAssignment(
|
||||
editorReq,
|
||||
res,
|
||||
'populate-clsi-cache-for-prompt'
|
||||
)
|
||||
populateClsiCache = variant === 'enabled'
|
||||
}
|
||||
|
||||
const pdfDownloadDomain = Settings.pdfDownloadDomain
|
||||
|
||||
if (!req.query.enable_pdf_caching) {
|
||||
|
||||
Reference in New Issue
Block a user