종목목록 전일대비 정렬문제

This commit is contained in:
Macbook
2026-06-16 08:53:35 +09:00
parent 615e1164a6
commit 518b69cdc6
8 changed files with 232 additions and 142 deletions
+10
View File
@@ -195,6 +195,16 @@ async function fetchTickersCore(markets: string[]): Promise<UpbitTickerRaw[]> {
return stale.length > 0 ? stale : [];
}
/** 정렬·패널 열림 등 최신 시세가 필요할 때 캐시 무효화 */
export function invalidateTickerCache(markets?: string[]): void {
if (!markets || markets.length === 0) {
memoryCache.delete('__all__');
return;
}
memoryCache.delete(cacheKey(markets));
memoryCache.delete('__all__');
}
/**
* ticker 조회 — 동일 markets 동시 요청 1회로 합침, 캐시·백엔드 우선.
*/