(rootDir: string, input: CacheKeyInput)
| 133 | * once the extraction succeeds. |
| 134 | */ |
| 135 | export function lookupCacheEntry(rootDir: string, input: CacheKeyInput): CacheLookup { |
| 136 | const keyHash = computeCacheKey(input); |
| 137 | const dir = join(rootDir, cacheEntryDirName(keyHash)); |
| 138 | const complete = existsSync(join(dir, COMPLETE_SENTINEL)); |
| 139 | return { entry: { dir, keyHash }, hit: complete }; |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Ensure a cache entry's directory exists so the extractor can write into it. |
no test coverage detected