修改videoinfo的缓存时长并支持环境变量设置

This commit is contained in:
mtvpls
2025-12-23 10:29:10 +08:00
parent b549736c60
commit f8ff0a3b50
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ interface VideoInfoCacheEntry {
}
const METAINFO_CACHE_TTL_MS = 7 * 24 * 60 * 60 * 1000; // 7天
const VIDEOINFO_CACHE_TTL_MS = 60 * 60 * 1000; // 1小时
const VIDEOINFO_CACHE_TTL_MS = (parseInt(process.env.VIDEOINFO_CACHE_MINUTES || '1440', 10)) * 60 * 1000; // 默认1天
const METAINFO_CACHE: Map<string, MetaInfoCacheEntry> = new Map();
const VIDEOINFO_CACHE: Map<string, VideoInfoCacheEntry> = new Map();