mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 01:09:01 +08:00
feat: 使用自定义缓存时 cacheKey
的值不能为空
This commit is contained in:
parent
c9158ceb1d
commit
de2813b035
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.381",
|
"version": "2.14.382",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -49,6 +49,11 @@ export default async function download(
|
|||||||
const requestTimeout = timeout || defaultTimeout;
|
const requestTimeout = timeout || defaultTimeout;
|
||||||
const id = hex_md5(userAgent + url);
|
const id = hex_md5(userAgent + url);
|
||||||
|
|
||||||
|
if ($arguments?.cacheKey === true) {
|
||||||
|
$.error(`使用自定义缓存时 cacheKey 的值不能为空`);
|
||||||
|
$arguments.cacheKey = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
const customCacheKey = $arguments?.cacheKey
|
const customCacheKey = $arguments?.cacheKey
|
||||||
? `#sub-store-cached-custom-${$arguments?.cacheKey}`
|
? `#sub-store-cached-custom-${$arguments?.cacheKey}`
|
||||||
: undefined;
|
: undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user