Cache frequently-used calculated data


When calculating values or data drains resources, cache them if the values remain unchanged, in order to avoid repeating such operations.

Caching systems like key-value store are designed to store this data. Generally, they maintain data in RAM, and so considerably reduce CPU usage if the calculated data is retrieved often.