Cache stats and metrics in the server
We currently have multiple routes which read the whole stats file or metrics file to produce a response. This is somewhat inefficient as these files change rarely (every 60s or only once per day). Hence, we should read these files into memory regularly (put them behind an ArcSwap
) and use those in-memory versions to fulfil the requests.