板块缓存
This commit is contained in:
@@ -366,9 +366,7 @@ async def fetch_sector_list(sector_type: str) -> list[dict]:
|
||||
data = await _fetch_akshare(sector_type)
|
||||
if data:
|
||||
_sector_cache[sector_type] = (data, now)
|
||||
ttl = _sector_ttl_hours()
|
||||
if ttl > 0:
|
||||
set_cache(cache_key, json.dumps(data, ensure_ascii=False), ttl_hours=ttl)
|
||||
# akshare 数据源更新不确定,不写入磁盘缓存
|
||||
return data
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user