config(cache): 将默认缓存TTL从5分钟调整为2小时

- CACHE_TTL_SECONDS 默认值从 300s (5分钟) 改为 7200s (2小时)
- 适合日线数据场景,减少重复请求
This commit is contained in:
2026-05-07 23:30:47 +08:00
parent b4a45e479f
commit be12686f13

View File

@@ -100,7 +100,7 @@ def get_fetcher() -> UniversalDataFetcher:
# 缓存配置
CACHE_MAXSIZE = int(os.getenv('CACHE_MAXSIZE', '128')) # 默认缓存128条数据
CACHE_TTL_SECONDS = int(os.getenv('CACHE_TTL_SECONDS', '300')) # 默认5分钟过期
CACHE_TTL_SECONDS = int(os.getenv('CACHE_TTL_SECONDS', '7200')) # 默认5分钟过期
# 带时间戳的缓存条目
class TimedCacheEntry: