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", "name": "sub-store",
"version": "2.14.426", "version": "2.14.427",
"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": {

View File

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