mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 10:25:58 +00:00
only cache in prod
This commit is contained in:
@@ -56,8 +56,10 @@ export const orgService = createOrganizationServiceClient(transport);
|
|||||||
export const settingsService = createSettingsServiceClient(transport);
|
export const settingsService = createSettingsServiceClient(transport);
|
||||||
|
|
||||||
export async function getBrandingSettings(organization?: string) {
|
export async function getBrandingSettings(organization?: string) {
|
||||||
"use cache";
|
if (process.env.DEBUG !== "true") {
|
||||||
cacheLife("hours");
|
("use cache");
|
||||||
|
cacheLife("hours");
|
||||||
|
}
|
||||||
|
|
||||||
return settingsService
|
return settingsService
|
||||||
.getBrandingSettings({ ctx: makeReqCtx(organization) }, {})
|
.getBrandingSettings({ ctx: makeReqCtx(organization) }, {})
|
||||||
@@ -65,8 +67,10 @@ export async function getBrandingSettings(organization?: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getLoginSettings(orgId?: string) {
|
export async function getLoginSettings(orgId?: string) {
|
||||||
"use cache";
|
if (process.env.DEBUG !== "true") {
|
||||||
cacheLife("hours");
|
("use cache");
|
||||||
|
cacheLife("hours");
|
||||||
|
}
|
||||||
|
|
||||||
return await settingsService
|
return await settingsService
|
||||||
.getLoginSettings({ ctx: makeReqCtx(orgId) }, {})
|
.getLoginSettings({ ctx: makeReqCtx(orgId) }, {})
|
||||||
@@ -100,8 +104,10 @@ export async function registerTOTP(userId: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getGeneralSettings() {
|
export async function getGeneralSettings() {
|
||||||
"use cache";
|
if (process.env.DEBUG !== "true") {
|
||||||
cacheLife("hours");
|
("use cache");
|
||||||
|
cacheLife("hours");
|
||||||
|
}
|
||||||
|
|
||||||
return settingsService
|
return settingsService
|
||||||
.getGeneralSettings({}, {})
|
.getGeneralSettings({}, {})
|
||||||
@@ -109,8 +115,10 @@ export async function getGeneralSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getLegalAndSupportSettings(organization?: string) {
|
export async function getLegalAndSupportSettings(organization?: string) {
|
||||||
"use cache";
|
if (process.env.DEBUG !== "true") {
|
||||||
cacheLife("hours");
|
("use cache");
|
||||||
|
cacheLife("hours");
|
||||||
|
}
|
||||||
|
|
||||||
return settingsService
|
return settingsService
|
||||||
.getLegalAndSupportSettings({ ctx: makeReqCtx(organization) }, {})
|
.getLegalAndSupportSettings({ ctx: makeReqCtx(organization) }, {})
|
||||||
@@ -118,8 +126,10 @@ export async function getLegalAndSupportSettings(organization?: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getPasswordComplexitySettings(organization?: string) {
|
export async function getPasswordComplexitySettings(organization?: string) {
|
||||||
"use cache";
|
if (process.env.DEBUG !== "true") {
|
||||||
cacheLife("hours");
|
("use cache");
|
||||||
|
cacheLife("hours");
|
||||||
|
}
|
||||||
|
|
||||||
return settingsService
|
return settingsService
|
||||||
.getPasswordComplexitySettings({ ctx: makeReqCtx(organization) })
|
.getPasswordComplexitySettings({ ctx: makeReqCtx(organization) })
|
||||||
|
|||||||
Reference in New Issue
Block a user