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.
- we need cache to improve the performance of an application.
- we need cache to reduce timeout in the appication.
- cache would help in reducing network trips
- 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)