plus.cache.calculate(function(size) {
console.log(size)
sizeCache = size;
mui.confirm("您目前的系统缓存为" + parseFloat(sizeCache / (1024 * 1024)).toFixed(2) + "M?", "清除缓存", ["确认", "取消"], function(e) {
if(e.index == 1) {} else {
plus.cache.clear(function() {
alert("缓存清除完毕")
});
}
});
});
想了解详细,可查看:http://www.dcloud.io/docs/api/zh_cn/cache.htmlMUI app显示和清除缓存代码
mui的app提供了显示缓存数量和清除缓存的方法:
