* Read cached spec from disk
(cachePath: string)
| 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 |