MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / cacheFresh

Function cacheFresh

packages/cli/src/utils/skillsUpdateCheck.ts:31–34  ·  view source on GitHub ↗
(lastSkillsCheck: string | undefined, now: number)

Source from the content-addressed store, hash-verified

29}
30
31function cacheFresh(lastSkillsCheck: string | undefined, now: number): boolean {
32 if (!lastSkillsCheck) return false;
33 return now - new Date(lastSkillsCheck).getTime() < CHECK_INTERVAL_MS;
34}
35
36/** Run the real check and persist the result to the cache. */
37async function refreshSkillsCache(): Promise<SkillsUpdateMeta> {

Callers 1

checkSkillsForUpdateFunction · 0.85

Calls 1

getTimeMethod · 0.65

Tested by

no test coverage detected