Blazing Fast Caching Service In ASP.NET Core | Redis Compatible



Blazing Fast Caching Service In ASP.NET Core | Redis Compatible

Blazing Fast Caching Service In ASP.NET Core | Redis Compatible

Support me on Patreon to access the source code:
https://www.patreon.com/milanjovanovic

Caching is a common technique to improve performance in web applications. So I’ll show you a complete implementation for a caching service using the IDistributedCache interface in ASP.NET Core. You will also see how to use a ConcurrentDictionary to store cache keys to support removing keys from the cache by a prefix.

Join my weekly .NET newsletter:
https://www.milanjovanovic.tech

Caching Repository In ASP.NET Core
https://www.milanjovanovic.tech/blog/decorator-pattern-in-asp-net-core

Read my Blog here:
https://www.milanjovanovic.tech/blog

Subscribe for more:
https://www.youtube.com/@MilanJovanovicTech?sub_confirmation=1

Chapters
0:00 Defining the ICacheService interface
0:41 Why is caching useful?
1:35 Adding methods to the ICacheService
4:53 Defining the CacheService
6:33 Implementing GetAsync
8:26 Implementing SetAsync
9:21 Implementing RemoveAsync
9:37 Implementing RemoveByPrefixAsync
14:45 Configuring services with dependency injection
15:43 Using the CacheService to implement the Cache-Aside pattern
17:52 Adding generic Cache-Aside implementation to CacheService

Comments are closed.