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