Add freshness check to _detect_gaps() in all cache layers (memory, database, async_database). For limit-only requests (no start/end), verify the most recent candle is within 2 intervals of current time. If stale, flag as a gap so fresh data is fetched from exchange. This fixes the issue where EDM served hours-old cached data instead of fetching current candles when clients requested "latest N candles". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| async_database.py | ||
| completeness.py | ||
| connection_pool.py | ||
| database.py | ||
| gap_filler.py | ||
| gaps.py | ||
| manager.py | ||
| memory.py | ||