feat: 默认缓存阈值 1024KB

This commit is contained in:
xream 2024-11-24 12:31:18 +08:00
parent 514414587b
commit e229408a2d
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.426",
"version": "2.14.427",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -44,8 +44,13 @@ export default async function download(
}
}
const { isNode, isStash, isLoon, isShadowRocket, isQX } = ENV();
const { defaultProxy, defaultUserAgent, defaultTimeout, cacheThreshold } =
$.read(SETTINGS_KEY);
const {
defaultProxy,
defaultUserAgent,
defaultTimeout,
cacheThreshold: defaultCacheThreshold,
} = $.read(SETTINGS_KEY);
const cacheThreshold = defaultCacheThreshold || 1024;
let proxy = customProxy || defaultProxy;
if ($.env.isNode) {
proxy = proxy || eval('process.env.SUB_STORE_BACKEND_DEFAULT_PROXY');