diff --git a/src/main/shell-session/shell-environment-cache.injectable.ts b/src/main/shell-session/shell-environment-cache.injectable.ts index 0e13d03bda..91301f0e53 100644 --- a/src/main/shell-session/shell-environment-cache.injectable.ts +++ b/src/main/shell-session/shell-environment-cache.injectable.ts @@ -18,10 +18,13 @@ const shellEnvironmentCacheInjectable = getInjectable({ const cache = new Map>>>(); return async (clusterId, builder) => { - const cacheLine = getOrInsert(cache, clusterId, asyncComputed(() => { - now(1000 * 60 * 10); // update every 10 minutes + const cacheLine = getOrInsert(cache, clusterId, asyncComputed({ + getValueFromObservedPromise: async () => { + now(1000 * 60 * 10); // update every 10 minutes - return builder(); + return builder(); + }, + betweenUpdates: "show-latest-value", })); await when(() => !cacheLine.pending.get());