-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix issue 4203,加入缓存机制,转换时间从半个小时优化至8分钟内 * fix4203 1.Map增加类型定义 2.去除dirPath的判断 close #4203
- Loading branch information
Showing
2 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Wxml } from './wxml' | ||
import { cloneDeep } from 'lodash' | ||
const cacheMap = new Map<string, Wxml>() | ||
|
||
export function getCacheWxml(dirpath: string): Wxml | undefined { | ||
return cloneDeep(cacheMap.get(dirpath)) | ||
} | ||
|
||
export function saveCacheWxml(dirpath: string, wxml: Wxml) { | ||
cacheMap.set(dirpath, cloneDeep(wxml)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters