* Shorthand for reading both from cache or from fresh for all call sites that * are asynchronous by default.
(transformOptions: TransformOptions)
| 325 | * are asynchronous by default. |
| 326 | */ |
| 327 | read(transformOptions: TransformOptions): Promise<ReadResult> { |
| 328 | return Promise.resolve().then(() => { |
| 329 | const cached = this.readCached(transformOptions); |
| 330 | if (cached.result != null) { |
| 331 | return cached.result; |
| 332 | } |
| 333 | return this.readFresh(transformOptions); |
| 334 | }); |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * Same as `readFresh`, but reads from the cache instead of transforming |
no test coverage detected