fix(indexer): 60s TTL cache for cg/cmc aggregator endpoints (#288) #743

Merged
Brouie merged 1 commit from qa/288-cgcmc-ticker-cache into main 2026-06-04 08:03:38 +00:00
Brouie commented 2026-06-04 03:29:29 +00:00 (Migrated from gitlab.com)

/cg/tickers, /cmc/summary, /cmc/ticker loop all pairs with a per-pair stats + extensions fanout (N–2N round trips), uncached, on the 10-connection API pool → a burst pins the pool. Adds a shared 60s TTL cache (per-endpoint serialized response), modeled on the route_solver/orderbook caches, so the fanout runs at most once/minute.

Pagination (the other triage half) is deferred + flagged on the issue: these are aggregator complete-snapshot endpoints (CG/CMC expect every pair), so naive page-by-page would hide pairs — that's a format decision. The cache already removes the pool-exhaustion vector.

cargo check clean.

GitLab #288

`/cg/tickers`, `/cmc/summary`, `/cmc/ticker` loop all pairs with a per-pair stats + extensions fanout (N–2N round trips), uncached, on the 10-connection API pool → a burst pins the pool. Adds a shared 60s TTL cache (per-endpoint serialized response), modeled on the route_solver/orderbook caches, so the fanout runs at most once/minute. Pagination (the other triage half) is deferred + flagged on the issue: these are aggregator complete-snapshot endpoints (CG/CMC expect every pair), so naive page-by-page would hide pairs — that's a format decision. The cache already removes the pool-exhaustion vector. cargo check clean. GitLab #288
PlasticDigits (Migrated from gitlab.com) merged commit e44bae0399 into main 2026-06-04 08:03:38 +00:00
PlasticDigits commented 2026-06-04 08:03:39 +00:00 (Migrated from gitlab.com)

mentioned in commit e44bae0399

mentioned in commit e44bae0399e0a5d4c6a8aea739b2208fcce5c02f
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!743
No description provided.