Back to Catalog
Cloud
azure
Cache-Aside
Load data on demand into a cache from a data store
Intent & Description
The Cache-Aside pattern loads data on demand into a cache from a data store. The application first checks the cache for the requested data. If the data is not in the cache, the application retrieves it from the data store and stores it in the cache for future requests. This pattern provides performance benefits by reducing direct data store access.
Real-world Use Case
Use when you want to improve performance by caching frequently accessed data or when data store access is expensive.
Source
Advantages
- Improved performance through caching
- Reduced load on data store
- On-demand loading prevents unnecessary caching
- Simple to implement
Disadvantages
- Cache staleness issues
- Requires cache invalidation strategy
- Additional cache infrastructure