Skip to content

Commit

Permalink
feat: 使用自定义缓存时 cacheKey 的值不能为空
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Sep 13, 2024
1 parent c9158ce commit de2813b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 5 additions & 0 deletions backend/src/utils/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit de2813b

Please sign in to comment.