UNPKG

400 BJavaScriptView Raw
1import appGlobal from './global'
2
3appGlobal.cacheData = appGlobal.cacheData || {}
4
5export function cacheDataSet (key, val) {
6 appGlobal.cacheData[key] = val
7}
8
9export function cacheDataGet (key, delelteAfterGet) {
10 const temp = appGlobal.cacheData[key]
11 delelteAfterGet && delete appGlobal.cacheData[key]
12 return temp
13}
14
15export function cacheDataHas (key) {
16 return key in appGlobal.cacheData
17}