缓存封装增加是否为空属性
This commit is contained in:
@@ -19,6 +19,7 @@ class CACHE {
|
||||
throw (new Error('请传入缓存name值:index | {name:index}'))
|
||||
return
|
||||
}
|
||||
this._isEmpty=Object.keys(data).length>=2?false:true;
|
||||
for (let i in data) {
|
||||
this[i] = data[i]
|
||||
const canWrite = i.slice(0, 1) !== '_'
|
||||
|
||||
Reference in New Issue
Block a user