Skip to content

Commit cf88b62

Browse files
committed
refactor(core): remove temp file memory cache
1 parent fea9a9e commit cf88b62

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/core/src/app/resolveAppWriteTemp.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,10 @@ import type { AppDir, AppWriteTemp } from '../types/index.js'
55
* Resolve write temp file util for vuepress app
66
*/
77
export const resolveAppWriteTemp = (dir: AppDir): AppWriteTemp => {
8-
const tempCache = new Map<string, string>()
9-
108
const writeTemp: AppWriteTemp = async (file: string, content: string) => {
119
const filePath = dir.temp(file)
12-
const contentCached = tempCache.get(filePath)
13-
if (contentCached !== content) {
14-
await fs.outputFile(filePath, content)
15-
tempCache.set(filePath, content)
16-
}
10+
await fs.outputFile(filePath, content)
1711
return filePath
1812
}
19-
2013
return writeTemp
2114
}

0 commit comments

Comments
 (0)