summaryrefslogtreecommitdiff
path: root/src/utils/cache.js
blob: f9f3d238e1468a08064c701d5f51e25377b2c10f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * 缓存
 * @author 陈劲松
 * @date 2021/6/30
*/

const cache = {
  capitalGeo: null
}

export function getCache (key, defaultValue = null) {
  return cache[key] ? cache[key] : defaultValue
}

export function setCache (key, value) {
  cache[key] = value
}