farst-cache
Version:
精简的前端缓存工具,防止内存泄露
23 lines (21 loc) • 426 B
JavaScript
/**
* @Author: 强峰 <qiangf>
* @Date: 2018-06-15 15:10
* @Email: fengqiang@iflyek.com
* @Last modified by: qiangf
* @Last modified time: 2018-06-16 11:11
*/
import {Util} from './Util'
class FarstCache {
constructor () {
this.list = {}
this.Util = new Util()
}
setValue (key, value) {
this.list[key] = value
}
getValue (key) {
return this.list[key]
}
}
window.FarstCache = FarstCache