mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-12 23:36:55 +08:00
Reduce the request frequency to the Binance API and add backend caching.
This commit is contained in:
@@ -50,7 +50,11 @@ export default function AILearning({ traderId }: AILearningProps) {
|
||||
const { data: performance, error } = useSWR<PerformanceAnalysis>(
|
||||
traderId ? `performance-${traderId}` : 'performance',
|
||||
() => api.getPerformance(traderId),
|
||||
{ refreshInterval: 10000 }
|
||||
{
|
||||
refreshInterval: 30000, // 30秒刷新(AI学习分析数据更新频率较低)
|
||||
revalidateOnFocus: false,
|
||||
dedupingInterval: 20000,
|
||||
}
|
||||
);
|
||||
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user