mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-28 10:50:50 -06:00
fix: caching issue with translate surveys (#2288)
This commit is contained in:
@@ -4,7 +4,7 @@ import { env } from "./env";
|
||||
|
||||
export const IS_FORMBRICKS_CLOUD = env.IS_FORMBRICKS_CLOUD === "1";
|
||||
export const REVALIDATION_INTERVAL = 0; //TODO: find a good way to cache and revalidate data when it changes
|
||||
export const SERVICES_REVALIDATION_INTERVAL = 60 * 30; // 30 minutes
|
||||
export const SERVICES_REVALIDATION_INTERVAL = 60 * 60 * 3; // 3 hours
|
||||
export const MAU_LIMIT = IS_FORMBRICKS_CLOUD ? 9000 : 1000000;
|
||||
|
||||
// URLs
|
||||
|
||||
@@ -357,7 +357,7 @@ export const transformToLegacySurvey = async (
|
||||
const targetLanguage = languageCode ?? "default";
|
||||
return reverseTranslateSurvey(survey, targetLanguage);
|
||||
},
|
||||
[`transformToLegacySurvey-${survey}`],
|
||||
[`transformToLegacySurvey-${survey.id}-${languageCode}`],
|
||||
{
|
||||
tags: [surveyCache.tag.byId(survey.id)],
|
||||
revalidate: SERVICES_REVALIDATION_INTERVAL,
|
||||
|
||||
Reference in New Issue
Block a user