mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor(core): update cache key
This commit is contained in:
parent
4a8b7c0648
commit
ee0e3b8bd0
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ type WellKnownMap = {
|
||||||
'custom-phrases-tags': string[];
|
'custom-phrases-tags': string[];
|
||||||
'tenant-cache-expires-at': number;
|
'tenant-cache-expires-at': number;
|
||||||
// Currently, tenant type cannot be updated once created. So it's safe to cache.
|
// Currently, tenant type cannot be updated once created. So it's safe to cache.
|
||||||
'is-developer-tenant': boolean;
|
'is-development-tenant': boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type WellKnownCacheType = keyof WellKnownMap;
|
type WellKnownCacheType = keyof WellKnownMap;
|
||||||
|
@ -58,7 +58,7 @@ function getValueGuard(type: WellKnownCacheType): ZodType<WellKnownMap[typeof ty
|
||||||
case 'tenant-cache-expires-at': {
|
case 'tenant-cache-expires-at': {
|
||||||
return z.number();
|
return z.number();
|
||||||
}
|
}
|
||||||
case 'is-developer-tenant': {
|
case 'is-development-tenant': {
|
||||||
return z.boolean();
|
return z.boolean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ export const createSignInExperienceLibrary = (
|
||||||
const plan = await getTenantSubscriptionPlan(cloudConnection);
|
const plan = await getTenantSubscriptionPlan(cloudConnection);
|
||||||
|
|
||||||
return plan.id === developmentTenantPlanId;
|
return plan.id === developmentTenantPlanId;
|
||||||
}, ['is-developer-tenant']);
|
}, ['is-development-tenant']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the override data for the sign-in experience by reading from organization data. If the
|
* Get the override data for the sign-in experience by reading from organization data. If the
|
||||||
|
|
Loading…
Reference in a new issue