MCPcopy Create free account
hub / github.com/vercel/vercel / readCache

Method readCache

packages/cli/src/util/openapi/openapi-cache.ts:273–280  ·  view source on GitHub ↗

* Read cached spec from disk

(cachePath: string)

Source from the content-addressed store, hash-verified

271 * Read cached spec from disk
272 */
273 private async readCache(cachePath: string): Promise<CachedSpec | null> {
274 try {
275 const content = await readFile(cachePath, 'utf-8');
276 return JSON.parse(content) as CachedSpec;
277 } catch {
278 return null;
279 }
280 }
281
282 /**
283 * Save public spec to disk cache

Callers 1

loadSpecMethod · 0.95

Calls 2

readFileFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected