mirror of
https://github.com/github/codeql-action.git
synced 2026-10-29 17:17:15 +00:00
Refactor cache storage to use cacheCommandOutput for consistency
This commit is contained in:
2
lib/entry-points.js
generated
2
lib/entry-points.js
generated
@@ -149957,7 +149957,7 @@ function getCachedCommandOutput(key, cmd, validate) {
|
||||
if (!isObject(entry) || !isString(entry.cmd) || cmd !== void 0 && entry.cmd !== cmd || validate !== void 0 && !validate(entry.output)) {
|
||||
return void 0;
|
||||
}
|
||||
inMemoryCache.set(key, { cmd: entry.cmd, output: entry.output });
|
||||
cacheCommandOutput(key, entry.cmd, entry.output);
|
||||
return entry.output;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export function getCachedCommandOutput<T>(
|
||||
}
|
||||
|
||||
// Memoize so subsequent lookups in this process hit tier 1.
|
||||
inMemoryCache.set(key, { cmd: entry.cmd, output: entry.output });
|
||||
cacheCommandOutput(key, entry.cmd, entry.output);
|
||||
return entry.output as T;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user