What is lazy loading in caching, and when should it be used?
Ask by ICSM Computer
Updated 10 Mar 2025
Lazy Loading in Caching (Cache-Aside Pattern)
Lazy Loading, also known as Cache-Aside, is a caching strategy where data is loaded into the cache only when it is requested. If the requested data is not found in the cache (cache miss), the application fetches it from the database, stores it in the cache, and returns it to the user.
How Lazy Loading Works
Example in C# using Redis
When to Use Lazy Loading?
Use When:
Avoid When: