缓存封装增加是否为空属性

This commit is contained in:
2025-01-04 11:26:50 +08:00
parent ffdcec41c8
commit de48d7f933

View File

@@ -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) !== '_'