From be12686f1363dcb6952988ed9b1b44e5942e8e7d Mon Sep 17 00:00:00 2001 From: aszerW Date: Thu, 7 May 2026 23:30:47 +0800 Subject: [PATCH] =?UTF-8?q?config(cache):=20=E5=B0=86=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=BC=93=E5=AD=98TTL=E4=BB=8E5=E5=88=86=E9=92=9F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BA2=E5=B0=8F=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CACHE_TTL_SECONDS 默认值从 300s (5分钟) 改为 7200s (2小时) - 适合日线数据场景,减少重复请求 --- core/datasource/flask_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/datasource/flask_server.py b/core/datasource/flask_server.py index c2b3b12..83217f8 100644 --- a/core/datasource/flask_server.py +++ b/core/datasource/flask_server.py @@ -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: