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
<PackageReference Include="StackExchange.Redis.Wrapper.NCache" Version="5.3.7" />
<PackageVersion Include="StackExchange.Redis.Wrapper.NCache" Version="5.3.7" />
<PackageReference Include="StackExchange.Redis.Wrapper.NCache" />
paket add StackExchange.Redis.Wrapper.NCache --version 5.3.7
#r "nuget: StackExchange.Redis.Wrapper.NCache, 5.3.7"
#:package StackExchange.Redis.Wrapper.NCache@5.3.7
#addin nuget:?package=StackExchange.Redis.Wrapper.NCache&version=5.3.7
#tool nuget:?package=StackExchange.Redis.Wrapper.NCache&version=5.3.7
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:
- A running NCache Server cluster.
- An NCache cache created and running on the cluster.
- The StackExchange.Redis.Wrapper.NCache package installed.
- 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.
- Open
client.ncconf. - Locate the cache entry named
demoCacheand replace it with the name of your cache. - Update the server address to point to a node hosting that cache.
Example:
<cache id="demoCache" ... >
<server name="10.0.0.1" ... />
</cache>
Replace:
demoCachewith the name of your cache.10.0.0.1with 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.
- Please refer to https://www.alachisoft.com/support.html to select a support resource suitable for your issue.
- To request additional features or report documentation issues, email support@alachisoft.com.
Copyright
Copyright © 2026 Alachisoft.
| Product | Versions 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. |
-
.NETFramework 4.6.2
- Alachisoft.NCache.SDK (>= 5.3.7.2)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
-
.NETStandard 2.0
- Alachisoft.NCache.SDK (>= 5.3.7.2)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.