Introducing Caching Patterns
Before going deep into caching technology, let’s look back and find out what cache technology is. The cache is a service that stores data, such as in the database, but provides the fastest access and does not persist data longer than requested by time-to-live settings. The data stored in the cache is usually the result of previous calculations or commonly requested data retrieved with a higher speed than from the database. In other words, the cache is a temporary storage of precomputed data. What data can be cached for modern web services? Firstly, the output of pages. On modern websites that receive millions of page views, caching can be utilized for pages that are not frequently updated. By storing the output of these pages, the system can quickly return the previously generated response to the user. This process conserves website resources by eliminating the need to repeatedly generate the same page.
The idea of caching temporary output is...