...

/

Caching Basics—Theory

Caching Basics—Theory

Learn the basic theory of caching to implement caches more sensibly.

Understanding caching

Caching is a common technique used by servers to improve the performance and responsiveness of applications. Caching involves temporarily storing frequently accessed data in a readily accessible location, such as memory, disk, or even another server, so it can be quickly retrieved without performing the computation or database query again.

Several types of caching mechanisms can be used by servers, including in-memory caching, external caching, and distributed caching. Every kind of caching has its advantages and disadvantages, and the choice of which type to use will depend on the specific requirements of each application. Let’s try to understand and evaluate each of them briefly.

In-memory caching

In-memory caching is the simplest and involves storing data in the server’s RAM. In-memory caching ...