mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
refactor(core): reduce cache ttl to 5s (#3516)
This commit is contained in:
parent
69f563a056
commit
d0a5537b31
1 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,10 @@ export type WellKnownCacheKey = (typeof cacheKeys)[number];
|
|||
const buildKey = (tenantId: string, key: WellKnownCacheKey) => `${tenantId}:${key}` as const;
|
||||
|
||||
class WellKnownCache {
|
||||
#cache = new TtlCache<string, unknown>(180_000 /* 3 minutes */);
|
||||
// This TTL should be very small since the sign-in experiences will be unusable
|
||||
// if requests hit different instances during the cache-hit period.
|
||||
// We need to use a real central cache like Redis with invalidation mechanism for it.
|
||||
#cache = new TtlCache<string, unknown>(5000);
|
||||
|
||||
/**
|
||||
* Use for centralized well-known data caching.
|
||||
|
|
Loading…
Add table
Reference in a new issue