Modern public-facing applications such as Gmail and Facebook have changed the mindset of the users. Most clients now expect a similar type of responsiveness and performance from their applications. Developers have to use many strategies to meet client’s expectations. One such strategy is called caching that improves the application performance significantly. In this tutorial, I will show you how to use In-Memory caching in ASP.NET Core applications. I will also cover different techniques to configure the caching as per your application requirements.
Caching is one of the common techniques to make applications performant and scalable. It allows developers to store frequently accessed or heavy computed data to a temporary but fast storage layer so that all future requests for the same data are served up faster. Normally the cached data is transient and is stored in fast access hardware such as computer memory (RAM). Caching increases the data retrieval performance as the application doesn’t need to access the slower storage layer such as database or disk.
ASP.NET Core has many caching features to improve the application performance. We can use Cache Tag Helper, Distributed Cache Tag Helper, and Response Caching Middleware and ResponseCache attribute to improve the application performance. It is important for developers to understand the following two main types of caching techniques available in ASP.NET Core.
#caching #aspdotnet core