DEV Community

Ratik Mahajan
Ratik Mahajan

Posted on

Cache in System Design

What is Cache:

Cache is the storage area, where data is stored very close for processing. when we cache data, it would mean that data is available very close. this would improve the performance of the computer systems.

Why do we need cache

We need cache for several reasons.

  1. we need cache to improve the performance of an application.
  2. we need cache to reduce timeout in the appication.
  3. cache would help in reducing network trips
  4. cache would reduce Disk I/O operations.

How to use cache ?

Most common strategy that we often use with cache is lazy loading, if data is present in cache, it would be cache hit and application can use that data to process the request.
if data is not present in the cache, it would result in the cache miss and then data is fetched into the cache.

Top comments (0)