Caching stores frequently access data in a temporary storage and expedite its access using a cached copy as opposed to refetched (from disk) or recomputed (in memory) data. This has proven to be one of the most efficient performance optimization techniques and Moodle is no exception.
Moodle contains a powerful caching framework called Moodle Universal Cache (MUC), which allows certain functions to take advantage of different configured caching services (https://docs.moodle.org/en/Caching). A typical example of a function that makes use of caching is string fetching, especially when multiple languages are supported.
Before we take a look at how MUC works, let's explore some basic concepts first, namely cache types (modes), cache stores, and cache definitions.