(lastSkillsCheck: string | undefined, now: number)
| 29 | } |
| 30 | |
| 31 | function 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. */ |
| 37 | async function refreshSkillsCache(): Promise<SkillsUpdateMeta> { |
no test coverage detected