In my previous article A Step by Step Guide to In-Memory Caching in ASP.NET Core, I covered the basics of in-memory caching and I have shown you a practical example of implementing caching ASP.NET Web API. In-memory caching is only useful when your application is deployed on a single server. If you are planning to deploy your application on multiple servers in a typical web farm scenario, then you need a centralized caching solution. There are many ways you can implement distributed caching in ASP.NET Core and in this tutorial, I will talk about one of the most popular distributed cache called Redis Cache with some practical examples.

Download Source Code

What Is Distributed Caching?

A distributed cache is a cache shared by multiple application servers. Typically, it is maintained as an external service accessible to all servers. Distributed cache improve application performance and scalability because it can provide same data to multiple servers consistently and if one server restarts or crashes, the cashed data is still available to other servers as normal.

#aspdotnet #redis

ASP.NET Core Uses Redis Cache for Distributed Caching
3.25 GEEK