Mack's LoL Scout
Explain

Caching: the difference between “fast” and “miserable”

Caching is not an optimization. It’s a sanity feature. It makes reruns fast, makes bugs reproducible, and keeps Riot’s rate limits from dunking on you.

TL;DR

  • Cache raw responses so reruns are fast and reproducible.
  • Derived files (CSV/reports) are rebuildable. Delete and regenerate.
  • Update mode is a switch: normal = reuse, update = fetch fresh.

Two layers of data (don’t mix them)

Raw dataset

The original JSON responses. Save them. Don’t “fix” them. If something’s wrong, you want the raw truth.

Derived dataset

Your CSVs and reports. You can delete and rebuild these any time. They’re disposable and that’s the point.

Update mode (simple, effective)

Instead of a fancy “cache expires after N seconds”, use a toggle: normal runs reuse local files; update runs fetch fresh data and merge.

A tiny concept you can print

CACHE MODE: reuse files
UPDATE MODE: fetch + merge