diff --git a/index.js b/index.js index 066beb1..817f820 100644 --- a/index.js +++ b/index.js @@ -560,11 +560,12 @@ fastify.get('/*', async (request, reply) => { // 获取nocache 参数 const nocache = request.query.nocache ? true : false; + const random = request.query.random ? true : false; try { const key = getTokenKey(token); const metaPath = getMetaPath(key); - const ONE_DAY_MS = 24 * 60 * 60 * 1000; + const ONE_DAY_MS = random ? 5 * 1000 : 86400 * 7 * 1000; let apiData = null; if (fs.existsSync(metaPath) && !nocache) { try {