Caching
Caching
Storing items which are frequently accessed in a memory cache, is one definitive way to improve performance (latency) exponentially rather than accessing from disk.
Sample Cache Usage in system
Cache usage in a system
Why do we use cache?
- Cache improves the overall performance of the system. (latency and throughput)
- Example: Facebook prepares the user’s main page in advance and stores in a cache located geographically close to the user. This approach ensures faster page-load of the main page.
How the cache improves performance?
- Some items are likely to be accessed more often than others, so if we store these items where it can be accessed faster, we can improve performance considerably.
- The cache generally uses memory and is 10x - 100x times faster than persistent storage
Access this course and 1500+ top-rated courses and projects.