chore: Disable i18n cache in development (#12374)

This commit is contained in:
Erik 2023-11-16 13:56:24 -03:00 committed by GitHub
parent 7d09ccb0d7
commit e48a6c3dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ export function createNextApiHandler(router: AnyRouter, isPublic = false, namesp
const cacheRules = {
session: "no-cache",
i18n: `max-age=${ONE_YEAR_IN_SECONDS}`,
i18n: process.env.NODE_ENV === "development" ? "no-cache" : `max-age=${ONE_YEAR_IN_SECONDS}`,
// FIXME: Using `max-age=1, stale-while-revalidate=60` fails some booking tests.
"slots.getSchedule": `no-cache`,