StackExchange.Redis.Wrapper.NCache 5.3.7

dotnet add package StackExchange.Redis.Wrapper.NCache --version 5.3.7
                    
NuGet\Install-Package StackExchange.Redis.Wrapper.NCache -Version 5.3.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StackExchange.Redis.Wrapper.NCache" Version="5.3.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StackExchange.Redis.Wrapper.NCache" Version="5.3.7" />
                    
Directory.Packages.props
<PackageReference Include="StackExchange.Redis.Wrapper.NCache" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StackExchange.Redis.Wrapper.NCache --version 5.3.7
                    
#r "nuget: StackExchange.Redis.Wrapper.NCache, 5.3.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StackExchange.Redis.Wrapper.NCache@5.3.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StackExchange.Redis.Wrapper.NCache&version=5.3.7
                    
Install as a Cake Addin
#tool nuget:?package=StackExchange.Redis.Wrapper.NCache&version=5.3.7
                    
Install as a Cake Tool

NCache Wrapper for StackExchange.Redis

NCache Wrapper for StackExchange.Redis is a compatibility layer that enables .NET applications to use NCache as a drop-in replacement for Redis while preserving the familiar StackExchange.Redis programming model.

The wrapper implements the StackExchange.Redis interfaces, allowing existing Redis applications to migrate to NCache with minimal code changes while benefiting from NCache's distributed caching capabilities.

Supports StackExchange.Redis version 2.2.4.

Key benefits:

  • Migrate existing Redis applications to NCache with minimal code changes
  • Use the familiar StackExchange.Redis API
  • Access NCache enterprise features and scalability
  • Maintain existing Redis-based code while improving performance

Installation

Install-Package StackExchange.Redis.Wrapper.NCache

or, using the .NET CLI:

dotnet add package StackExchange.Redis.Wrapper.NCache

What is Installed

Installing this package adds the following NCache configuration files to your project:

  • client.ncconf — Defines the cache client settings, including the cache name and the list of server nodes the client connects to.
  • config.ncconf — Contains the cache configuration (cache topology, partitions, eviction policy, etc.) used when the cache is created or registered.
  • tls.ncconf — Contains TLS/SSL settings used to secure communication between the client and the NCache cluster, if enabled.

Prerequisites

Before using this package, ensure you have:

  1. A running NCache Server cluster.
  2. An NCache cache created and running on the cluster.
  3. The StackExchange.Redis.Wrapper.NCache package installed.
  4. The Alachisoft.NCache.SDK package installed.

Getting Started

Setting up NCache

If NCache is not installed on the machine running your application, update the configuration files included with this package so the client can connect to your cache.

  1. Open client.ncconf.
  2. Locate the cache entry named demoCache and replace it with the name of your cache.
  3. Update the server address to point to a node hosting that cache.

Example:

<cache id="demoCache" ... >
  <server name="10.0.0.1" ... />
</cache>

Replace:

  • demoCache with the name of your cache.
  • 10.0.0.1 with the hostname or IP address of an NCache server node.

Configure the Cache Name

Specify the cache to connect to in your application's configuration file.

<appSettings>
  <add key="CacheId" value="demoCache" />
</appSettings>

The wrapper uses the CacheId value to determine which NCache cache to connect to.

Connect to NCache

Create a ConnectionMultiplexer and obtain a database instance.

using Alachisoft.NCache.Client;
using NCache.OSS.StackExchange.Redis;
using System.Configuration;

string cacheName = ConfigurationManager.AppSettings["CacheId"];

ConnectionMultiplexer mux = ConnectionMultiplexer.Connect(cacheName);
INCacheDatabase db = mux.GetDatabase();

ConnectionMultiplexer and INCacheDatabase behave like the standard StackExchange.Redis ConnectionMultiplexer and IDatabase, allowing existing Redis operations to work with little or no code changes.

Access NCache APIs (Optional)

Applications that need NCache-specific functionality can obtain the underlying ICache instance.

ICache cache = mux.GetNCacheInterface(cacheName);

This provides access to APIs that are outside the StackExchange.Redis interface.

Configure Logging (Optional)

Applications can configure logging using the standard .NET logging infrastructure.

using Microsoft.Extensions.Logging;

ILoggerFactory loggerFactory = LoggerFactory.Create(builder =>
{
    builder
        .AddConsole()
        .SetMinimumLevel(LogLevel.Debug);
});

Resources

Technical Support

Alachisoft© provides various sources of technical support.

Copyright © 2026 Alachisoft.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.3.7 231 7/29/2026
5.2.0 1,600 6/3/2021