feat: 使用自定义缓存时 cacheKey 的值不能为空

This commit is contained in:
xream
2024-09-13 23:42:55 +08:00
parent 4a96716cd9
commit c63d9a304e
2 changed files with 6 additions and 1 deletions

View File

@@ -49,6 +49,11 @@ export default async function download(
const requestTimeout = timeout || defaultTimeout;
const id = hex_md5(userAgent + url);
if ($arguments?.cacheKey === true) {
$.error(`使用自定义缓存时 cacheKey 的值不能为空`);
$arguments.cacheKey = undefined;
}
const customCacheKey = $arguments?.cacheKey
? `#sub-store-cached-custom-${$arguments?.cacheKey}`
: undefined;