FeaturedIT topics

How to use NCache in ASP.Net Core

Although ASP.Net Core lacks a cache object, it provides support for several different types of caching including in-memory caching, distributed caching, and response caching. An open-source product provided by Alachisoft, NCache is an extremely fast, in-memory, distributed, scalable caching framework for use in .Net applications.

NCache is 100-percent native .Net. It is not only faster than Redis, but also provides several distributed caching features that are not supported by Redis. You can learn more about the differences between NCache and Redis here. This article will discuss how we can work with NCache in ASP.Net Core applications.

A distributed cache such as NCache can improve both the performance and scalability of applications. In a distributed cache, the cached data doesn’t reside in the memory of an individual web server. You can add or remove a server without impacting the cache or the cached data. And if any of the servers go down or stop responding, other servers will still be able to retrieve the cached data. This explains why the cached data in a distributed cache can survive server restarts.

Create an ASP.Net Core project in Visual Studio

First off, let’s create an ASP.Net Core project. If Visual Studio 2017 is up and running in your system, follow the steps given below to create a new ASP.Net Core project in Visual Studio.

Related Articles

Back to top button