MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / lookupCacheEntry

Function lookupCacheEntry

packages/engine/src/services/extractionCache.ts:135–140  ·  view source on GitHub ↗
(rootDir: string, input: CacheKeyInput)

Source from the content-addressed store, hash-verified

133 * once the extraction succeeds.
134 */
135export 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.

Callers 2

tryCachedExtractFunction · 0.85

Calls 2

computeCacheKeyFunction · 0.85
cacheEntryDirNameFunction · 0.85

Tested by

no test coverage detected