mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #262024 from microsoft/tyriar/suggest_cache
Actually use the cache for suggest globals
This commit is contained in:
@@ -128,6 +128,12 @@ async function fetchAndCacheShellGlobals(
|
||||
): Promise<ICompletionResource[] | undefined> {
|
||||
const cacheKey = getCacheKey(machineId ?? 'no-machine-id', remoteAuthority, shellType);
|
||||
|
||||
// Check if there's a cached entry
|
||||
const cached = cachedGlobals.get(cacheKey);
|
||||
if (cached) {
|
||||
return cached.commands;
|
||||
}
|
||||
|
||||
// Check if there's already an in-flight request for this cache key
|
||||
const existingRequest = inflightRequests.get(cacheKey);
|
||||
if (existingRequest) {
|
||||
|
||||
Reference in New Issue
Block a user