perf: 延长缓存时间至7天以提升性能

优化缓存策略,将缓存时间从10分钟延长至7天,减少API调用频率
This commit is contained in:
2025-08-05 16:05:44 +08:00
parent 2f84227057
commit 7f377fe2f7
2 changed files with 31 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ $apiBaseUrl = 'https://um.com';
$token = '你的tocken';
$websiteId = '你的网站id';
$cacheFile = 'umami_cache.json';
$cacheTime = 600; // 缓存时间为10分钟600秒
$cacheTime = 604800; // 缓存时间为7天604800秒
// 获取当前时间戳(毫秒级)
$currentTimestamp = time() * 1000;