By IT Brew Staff
less than 3 min read
Definition:
Caching allows for speedy data retrieval, as the request doesn’t need to access a storage layer. However, a typical cache only has so much capacity. As a result, caching usually comes into play for a narrow set of use-cases: for data that’s frequently read (such as product information on an e-commerce site), data involved in frequent computations, and as a part of session state for stateful applications (which need to remember user identities, preferences, and more).
There are also multiple types of caches, including:
- CPU cache, which takes place directly on the processor.
- Web cache, which temporarily stores web content such as multimedia files, HTML files, and website images on servers and other devices to serve web users quicker.
- DNS cache, which stores recent domain-to-IP address mappings and allows DNS records to be retrieved faster, smoothing out network traffic.
- Disk cache, which leverages random access memory (RAM) to temporarily store data.
In addition to speed, effective caching translates into more predictable performance for websites and other infrastructure, reduces database “hotspots” such as overworked nodes, and reduces database costs, since caching lowers the total number of database instances. However, these benefits hinge on caching best practices, such as determining whether caching is effective for certain data types, and whether the data is structured for optimum caching.

