Skip to content

Allow caching of scores computations

Antoine Albertelli requested to merge cache-results into master

This commit introduces a cache for get_scores. Currently most of the time of a request is spent in this function (300ms). To save some latency, we instead store the scores on disk and load them when computing the leaderboard.

Cache coherency is managed by two mechanisms:

  1. The cache automatically expires after one minute, keeping possible mistakes short-lived.
  2. When adding new EventPlayerResults, the cache is invalidated.

Merge request reports

Loading