💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 缓存模块 ## 清除缓存 ~~~ function fnClearCache() { api.showProgress({ title : '清除缓存中...', }); api.clearCache(function() { setTimeout(function() { api.hideProgress(); fnGetCacheSize(); }, 500) }); } ~~~ ## 获取缓存 ~~~ function fnGetCacheSize() { api.getCacheSize(function(ret) { if (ret) { var size = parseInt(ret.size / 1024 / 1024 * 100) / 100 + ' MB'; var cacheSize = $api.byId('cacheSize'); cacheSize.innerHTML = size; }else{ var cacheSize = $api.byId('cacheSize'); cacheSize.innerHTML = '0MB'; } }); } ~~~