Using IMemoryCache to cache data inmemory using NET 5 An Introduction











>> YOUR LINK HERE: ___ http://youtube.com/watch?v=e74Hj2LHcaA

In this video, I am going to walk through how to cache data in-memory using the IMemoryCache interface in .NET 5. • Caching is a very useful mechanism to easily increase the performance of any application. • Previously I have covered topics on distributed cache services. • An introduction to Memcached, a distributed caching server:    • Memcached as Distributed Cache in .Ne...   • An introduction to Redis, a distributed caching server:    • Using Redis cache with ASP.Net Core W...   • 00:05 - Introduction of what is caching • 02:45 - Explain the problem domain • 03:34 - Create a new class for implementing cache using IMemoryCache • 04:55 - Get an item from the cache using a key • 05:50 - Add item to the cache • 06:50 - Different overloads for adding cache • 07:15 - Elaborate MemoryCacheEntryOptions object • 07:35 - Explaining cache expiration and difference between sliding and absolute expiration policy • 09:20 - Explanation of how to avoid stale data forever when using sliding expiration • 10:15 - What is a post-eviction callback and how it can be useful • 11:00 - Cache priority • 11:15 - Size of the cache entry • 11:50 - Mechanism I follow to add items to the cache using TryGetValue method • 13:40 - Configuring dependency injection for IMemoryCache • 14:05 - Explaining the overloads for AddMemoryCache extension method for adding IMemoryCache to the dependency injection • 15:00 - explaining CompactionPercentage property • 16:05 - Update the API to use the cache provider to get data • 17:05 - Debug through the code and explain how the feature is working

#############################









New on site
Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org