CacheService.prototype.getOrSet<T>(key: string,factory: () => Promise<T>,ttlSeconds?: number): Promise<T>
Reads a cached value or produces and stores it once for all concurrent callers of this service and key.
The in-flight registry is cleared after either success or failure. A
rejected factory therefore leaves no poisoned entry and the next caller
gets a fresh attempt. The factory result is written with the same explicit
or default TTL resolution as set.
factory: () => Promise<T>
Work that produces a value when the key is absent
Promise<T>
The cached or newly-produced value