import { Wxml } from './wxml' ; import { cloneDeep } from 'lodash' ; const cacheMap = new Map < string , Wxml > ( ) ; export function getCacheWxml ( dirpath ) { return cloneDeep ( cacheMap . get ( dirpath ) ) ; } export function saveCacheWxml ( dirpath , wxml ) { cacheMap . set ( dirpath , cloneDeep ( wxml ) ) ; }