Scale the tablebase cache to ~100k entries (#24)

* Slim the cached tablebase value to the fields the trainer reads (#20)

* Sample for LFU eviction instead of scanning the cache (#21)

* Make cache size configurable and back up daily off-peak (#22)

* Document the cache design in the glossary and an ADR (#23)

* Address cache-scaling code review findings
This commit is contained in:
2026-11-02 23:02:01 +01:00
committed by GitHub
parent fa71783e55
commit a5bb1cb670
16 changed files with 695 additions and 120 deletions
+3 -1
View File
@@ -63,7 +63,9 @@ promotion (still winning) for conversion puzzles, mate otherwise.
**Tablebase**:
A database of precomputed optimal outcomes for every position with at most
seven pieces, queried via the lichess API and cached.
seven pieces, queried via the lichess API and cached. The trainer caches only
the outcome data it grades on — enough to tell a winning move from a losing
one — not every metric the tablebase reports, and refetches anything else.
**Cooldown**:
Rate-limit state entered after a 429 from the lichess tablebase API, during