diff --git a/backend/package.json b/backend/package.json index d31a928ec..1ae453726 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.381", + "version": "2.14.382", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/utils/download.js b/backend/src/utils/download.js index e4dfcf682..58c0ec9bf 100644 --- a/backend/src/utils/download.js +++ b/backend/src/utils/download.js @@ -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;