|
|
@ -43,8 +43,9 @@ export async function createMarkdownToVueRenderFn(
|
|
|
|
): Promise<MarkdownCompileResult> => {
|
|
|
|
): Promise<MarkdownCompileResult> => {
|
|
|
|
const relativePath = slash(path.relative(srcDir, file))
|
|
|
|
const relativePath = slash(path.relative(srcDir, file))
|
|
|
|
const dir = path.dirname(file)
|
|
|
|
const dir = path.dirname(file)
|
|
|
|
|
|
|
|
const cacheKey = JSON.stringify({ src, file })
|
|
|
|
|
|
|
|
|
|
|
|
const cached = cache.get(src)
|
|
|
|
const cached = cache.get(cacheKey)
|
|
|
|
if (cached) {
|
|
|
|
if (cached) {
|
|
|
|
debug(`[cache hit] ${relativePath}`)
|
|
|
|
debug(`[cache hit] ${relativePath}`)
|
|
|
|
return cached
|
|
|
|
return cached
|
|
|
@ -148,7 +149,7 @@ export async function createMarkdownToVueRenderFn(
|
|
|
|
deadLinks,
|
|
|
|
deadLinks,
|
|
|
|
includes
|
|
|
|
includes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cache.set(src, result)
|
|
|
|
cache.set(cacheKey, result)
|
|
|
|
return result
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|