Cache Database Results
A5H73Y opened this issue ยท 1 comments
Currently the results are retrieved directly from the database each time, for poorly configured placeholder functionality this could mean a database call every X milliseconds which could lead to poor performance or even crashing.
The fix would be to use a configurable caching system that would store the results based on the parameters to a set amount of time, for example "top 10 results from X course".
This has been achieved in v6.0, using the combination of a MySQL library (https://github.com/Huskehhh/MySQL) and internal time results caching, results are achieved considerably quicker.
A course's times get re-cached when a player achieves a new time, or beats their existing time (based on config).
The amount of results to cache is stored in the config.yml.