Skip to content

Commit

Permalink
bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
NobyDa committed Apr 26, 2024
1 parent 56285e8 commit d10c2c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TestFlight/TestFlightAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TestFlight账户管理脚本
脚本作者: @NobyDa
脚本兼容: Surge4、QuantumultX、Loon(2.1.20 413+)
更新时间: 2024/04/15
更新时间: 2024/04/26
主要功能:
1. 自动存储多个TestFlight账户,并自动合并APP列表,避免切换账户。
Expand Down Expand Up @@ -199,7 +199,7 @@ function QueryRequest(o) {
const cacheKey = (cacheInfo[option.url] && cacheInfo[option.url].key) || `TESTFLIGHT-ACCOUNT-${letterEncode(option.url.split(/\/\/.+?\/(.+)/)[1])}`;
$.log(`Write to cache, URL "${option.url}", READ KEY "${cacheKey}"`);
cacheInfo[option.url] = { key: cacheKey, lastUsed: Date.now() };
Object.keys(cacheInfo).forEach((i) => (Date.now() - (cacheInfo[i].lastUsed || 0) > 864e5 * 7) && delete cacheInfo[i] && $.delete(`#${cacheKey}`));
Object.keys(cacheInfo).forEach((i) => (Date.now() - (cacheInfo[i].lastUsed || 0) > 864e5 * 3) && $.delete(`#${cacheInfo[i].key}`) && delete cacheInfo[i]); //clear unused cache for 3 days
$.write(cacheInfo, 'CachedInfo');
$.write(JSON.stringify(r), `#${cacheKey}`);
}
Expand Down

0 comments on commit d10c2c7

Please sign in to comment.