What is a cache? What are some types of them?
The following is my understanding about caches.
In French, cacher means “to hide.” However, in woods-person terms, “to hide” and “to store” are closely related, because storing food means hiding it from foragers. Hence, a cache is, functionally, a place to store stuff.
In computer terms, a cache typically means a place where results are stored so the CPU doesn’t have to figure them out again. Rather, said responses can just be brought from storage immediately. Cache storage needs to be fast in order to effectively save time.
Types of caches have evolved. They may be classified on how fast they are to retrieve from, as well as by what they store. In the web world, for instance, page caches store pre-built pages that are called for often. Object caches store answers to database queries, for instance, that are often requested. Opcode caches store parts of computer programs that are run often. In each case, the code has been refined into a finished solution, or closer to one, so the CPU doesn’t have to start from scratch to respond to a request.
On a website that delivers complex content, such as a WordPress site might become, all three of the caches described above might be used. Typically, without a cache, the content may be delivered noticeably slower compared to when a cache is used. At high levels, caches can be calibrated to be even more efficient.
Source:
Leave a Reply