feat(原生AI摘要功能支持缓存): 自定义缓存功能只支持memory,不支持文件缓存

(cherry picked from commit dd56dae44f7f555d9004e7d1f872085bded2cb86)
This commit is contained in:
anime
2024-12-23 17:39:48 +08:00
parent 46527958d0
commit 148545cea9
5 changed files with 29 additions and 18 deletions

View File

@@ -20,12 +20,12 @@ export async function getDataFromCache(key, force) {
}
}
export async function setDataToCache(key, data) {
export async function setDataToCache(key, data, customCacheTime) {
if (!data) {
return
}
// console.trace('[API-->>缓存写入]:', key)
await getApi().setCache(key, data)
await getApi().setCache(key, data, customCacheTime)
}
export async function delCacheData(key) {