( packPath: string, packReadingOptions: PackReadingOptions, executionContext?: FlowExecutionContext, )
| 107 | }; |
| 108 | |
| 109 | const readPackCached = async ( |
| 110 | packPath: string, |
| 111 | packReadingOptions: PackReadingOptions, |
| 112 | executionContext?: FlowExecutionContext, |
| 113 | ): Promise<Pack> => { |
| 114 | if (!executionContext) { |
| 115 | return readPack(packPath, packReadingOptions); |
| 116 | } |
| 117 | |
| 118 | const cacheKey = buildReadPackCacheKey(packPath, packReadingOptions); |
| 119 | let cachedPackPromise = executionContext.readPackCache.get(cacheKey); |
| 120 | if (!cachedPackPromise) { |
| 121 | cachedPackPromise = readPack(packPath, packReadingOptions); |
| 122 | executionContext.readPackCache.set(cacheKey, cachedPackPromise); |
| 123 | } |
| 124 | |
| 125 | return cachedPackPromise; |
| 126 | }; |
| 127 | |
| 128 | const cacheTableFilesForPack = ( |
| 129 | pack: Pack, |
no test coverage detected