This commit is contained in:
蒋小陌 2024-11-04 15:52:35 +08:00
parent ae9a73c457
commit a1d4a5ebc2
2 changed files with 1 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -161,7 +161,6 @@ const server = http.createServer(async (req, res) => {
} else {
try {
// 增加 API 调用次数
viewsInfo.apiCall++;
const apiData = await fetchApiData(reqPath, token, sign);
@ -221,7 +220,6 @@ const checkCacheHeaders = async (req, cacheMetaFile) => {
// 检查缓存是否有效
const isCacheValid = (cacheMetaFile, cacheContentFile) => {
if (!fs.existsSync(cacheMetaFile) || !fs.existsSync(cacheContentFile)) return false;
const cacheData = JSON.parse(fs.readFileSync(cacheMetaFile, 'utf8'));
return cacheData.expiration > Date.now();
};