mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
fix: use fresh timestamp when setting cache entry
Use Date.now() after checkGitHubRemote() completes instead of the pre-captured timestamp to ensure accurate 5-minute TTL.
This commit is contained in:
@@ -161,7 +161,7 @@ async function getGitHubRemoteStatus(projectPath: string): Promise<GitHubRemoteS
|
|||||||
const status = await checkGitHubRemote(projectPath);
|
const status = await checkGitHubRemote(projectPath);
|
||||||
githubRemoteCache.set(projectPath, {
|
githubRemoteCache.set(projectPath, {
|
||||||
status,
|
status,
|
||||||
checkedAt: now,
|
checkedAt: Date.now(),
|
||||||
});
|
});
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user