Skip to content

Commit

Permalink
feat: add returnGlobalFrontendApiCache flag (#6494)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Mar 11, 2024
1 parent eae373f commit 184e0e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -135,6 +135,7 @@ exports[`should create default config 1`] = `
"queryMissingTokens": false,
"responseTimeMetricsFix": false,
"responseTimeWithAppNameKillSwitch": false,
"returnGlobalFrontendApiCache": false,
"scimApi": false,
"sdkReporting": false,
"showInactiveUsers": false,
Expand Down
7 changes: 6 additions & 1 deletion src/lib/types/experimental.ts
Expand Up @@ -54,7 +54,8 @@ export type IFlagKey =
| 'responseTimeMetricsFix'
| 'scimApi'
| 'displayEdgeBanner'
| 'globalFrontendApiCache';
| 'globalFrontendApiCache'
| 'returnGlobalFrontendApiCache';

export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;

Expand Down Expand Up @@ -267,6 +268,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_GLOBAL_FRONTEND_API_CACHE,
false,
),
returnGlobalFrontendApiCache: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_RETURN_GLOBAL_FRONTEND_API_CACHE,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down
1 change: 1 addition & 0 deletions src/server-dev.ts
Expand Up @@ -51,6 +51,7 @@ process.nextTick(async () => {
userAccessUIEnabled: true,
sdkReporting: true,
globalFrontendApiCache: true,
returnGlobalFrontendApiCache: true,
},
},
authentication: {
Expand Down

0 comments on commit 184e0e5

Please sign in to comment.