MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / readCache

Function readCache

src/utils/updateCheck.ts:80–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80function readCache(): CachedCheck | null {
81 try {
82 const raw = fs.readFileSync(getCachePath(), "utf8");
83 const parsed = JSON.parse(raw) as Partial<CachedCheck>;
84 if (typeof parsed.checkedAt !== "number") return null;
85 return { checkedAt: parsed.checkedAt, latest: parsed.latest ?? null };
86 } catch {
87 return null;
88 }
89}
90
91function writeCache(latest: string | null): void {
92 try {

Callers 1

getUpdateInfoFunction · 0.85

Calls 1

getCachePathFunction · 0.85

Tested by

no test coverage detected