eatmyvenom / HyArcade

Backend for my system for presenting arcade games info

Home Page:https://hyarcade.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Use redis to cache common leaderboards

eatmyvenom opened this issue · comments

Describe something you would like to see in hyarcade
Since redis is available and many leaderboards take up to 30 seconds to generate, redis should be utilized for speed increases.

The tradeoffs will be both memory and not letting the data get too old. It can be done by storing lbs for some time whenever requested and then not storing them when they are not requested.

Notes

  • This will only apply to historical lbs wins mongo lbs are fast currently.
  • Redis Sorted Sets will be used to hold the data
  • LBs will be inserted to redis from the API
  • LBs that are cached are set in config
  • LBs are cached for 15 minutes
  • Mongo is used to get the display data (rank, plus color, etc...)
  • Score in set will be the lbProp
  • Historical miw may need a seperate system.