Distributed Caching with NCache in ASP.NET Core

By Sriram Mannava

In this article, let's look at how we can implement distributed caching in ASP.NET Core, with NCache as the caching provider. A cache is a high-speed memory that applications use to store frequently accessed data. Using a cache reduces unnecessary database hits, since the data being requested is readily available in the cache and hence the response times can be significantly lower when compared to the otherwise. Caching is popularly used as a performance improvement technique.

Use of Caching in APIs

In the context of Web APIs – developers can either adopt Response Caching, where the API sends additional information about the response in the headers, using which the consuming client can cache the response. In this article, we’ll focus on Data Caching, where cache is used as an auxiliary store for performance optimisation.

Read full Article

Types of Caches

Speaking of using cache as an auxiliary store, applications can use a part of its memory for caching frequently accessed data. This is called as In-Memory Caching. This approach is suitable for simpler applications that run on a single server node, and all the requests are served by that node alone. But it isn’t helpful for a load-balanced distributed system where a request could be handled by one of the many application nodes.

This is where we externalize the cache out of the application server nodes and is maintained as a separate system. All the application server nodes connect to this “external” caching server and set or get data as required. This is called Distributed Caching.

Read full Article
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.