config(cache): 将默认缓存TTL从5分钟调整为2小时
- CACHE_TTL_SECONDS 默认值从 300s (5分钟) 改为 7200s (2小时) - 适合日线数据场景,减少重复请求
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user