fix: cache ongoing parseFile() calls, fixes #416

This commit is contained in:
Harttle
2021-10-16 21:07:48 +08:00
committed by harttle
parent c58a116513
commit 8894cbfe6e
8 changed files with 63 additions and 32 deletions
+1
View File
@@ -1,4 +1,5 @@
export interface Cache<T> {
write (key: string, value: T): void | Promise<void>;
read (key: string): T | undefined | Promise<T | undefined>;
remove (key: string): void | Promise<void>;
}