NCache.CacheManager.Core
5.3.7
dotnet add package NCache.CacheManager.Core --version 5.3.7
NuGet\Install-Package NCache.CacheManager.Core -Version 5.3.7
<PackageReference Include="NCache.CacheManager.Core" Version="5.3.7" />
<PackageVersion Include="NCache.CacheManager.Core" Version="5.3.7" />
<PackageReference Include="NCache.CacheManager.Core" />
paket add NCache.CacheManager.Core --version 5.3.7
#r "nuget: NCache.CacheManager.Core, 5.3.7"
#:package NCache.CacheManager.Core@5.3.7
#addin nuget:?package=NCache.CacheManager.Core&version=5.3.7
#tool nuget:?package=NCache.CacheManager.Core&version=5.3.7
NCache CacheManager.Core Integration
NCache integration for CacheManager.Core. This package enables CacheManager.Core to use NCache as its distributed cache handle while leveraging NCache Messaging Service as a backplane for cache synchronization across multiple application instances.
Installation
Install-Package NCache.CacheManager.Core
or, using the .NET CLI:
dotnet add package NCache.CacheManager.Core
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/registered.
- tls.ncconf — Contains TLS/SSL settings used to secure communication between the client and the NCache cluster, if enabled.
Prerequisites
- .NET Standard 2.0 compatible application.
- An NCache 5.3.7 (or later) server should be up and running, with the target cache already created/registered on it.
- CacheManager.Core configured in your application.
Getting Started
Setting up NCache
Before running your application (if NCache is not installed on the current machine), you need to update client.ncconf so the client knows which cache to connect to and where to find it:
- Open
client.ncconf. - Locate the cache entry named
myCacheand rename it to the name of your actual cache (the cache you created/registered on the NCache server). - Under the
serversettings, update the server address to point to one of the nodes in the cluster where that cache is running.
Example:
<cache id="myCache" ... >
<server name="10.0.0.1" ... />
</cache>
Change myCache → YourCacheName, and 10.0.0.1 → the IP/hostname of a node hosting YourCacheName.
Setting up Package
NCacheCacheHandle<T> and NCacheCacheBackplane do not take an NCacheOptions instance directly as a
constructor argument. Instead, they are resolved by a configuration key from a shared, static registry
(NCacheConfigurations). There are three ways to get an NCacheOptions into that registry — pick whichever
fits your setup. All three end up wiring the cache handle/backplane the same way.
1. Fluent configuration (recommended)
The same way CacheManager.StackExchange.Redis lets you bootstrap Redis with WithRedisConfiguration /
WithRedisBackplane / WithRedisCacheHandle, this package provides WithNCacheConfiguration /
WithNCacheBackplane / WithNCacheCacheHandle:
var manager = CacheFactory.Build<int>(settings =>
{
settings
.WithSystemRuntimeCacheHandle()
.And
.WithNCacheConfiguration("ncache", config =>
{
config.WithCacheName("demoCache")
.WithEndpoint("127.0.0.1", 9800);
})
.WithMaxRetries(100)
.WithRetryTimeout(50)
.WithNCacheBackplane("ncache", "example_topic_name")
.WithNCacheCacheHandle("ncache", true);
});
manager.Add("test", 123456);
An existing NCacheOptions instance can be registered instead of the builder action:
settings.WithNCacheConfiguration("ncache", new NCacheOptions
{
CacheName = "demoCache",
ServerList = new List<NCacheOptions.ServerConfig>
{
new NCacheOptions.ServerConfig { Ip = "127.0.0.1" }
}
});
"ncache" is the configuration key — it is used to look up the matching connection details when
WithNCacheBackplane / WithNCacheCacheHandle are called, exactly like the Redis configuration key.
2. Via IServiceCollection / configuration binding
Register a named NCacheOptions through DI:
services.AddNCacheConfiguration("ncache", opt =>
{
opt.CacheName = "demoCache";
opt.ServerList.Add(new NCacheOptions.ServerConfig { Ip = "127.0.0.1" });
});
Or bind it from an IConfigurationSection (e.g. loaded from a JSON file):
// appsettings.json:
// { "ncache": { "cacheName": "demoCache", "serverList": [ { "ip": "127.0.0.1", "port": 9800 } ] } }
services.AddNCacheConfiguration("ncache", configuration.GetSection("ncache"));
Either overload populates NCacheConfigurations under "ncache". You still need to wire up the cache handle
and (optionally) the backplane yourself — registering the options alone does not build a CacheManagerConfiguration:
var provider = services.BuildServiceProvider();
var loggerFactory = provider.GetRequiredService<ILoggerFactory>();
var cache = CacheFactory.Build<object>(settings =>
{
settings
.WithDictionaryHandle()
.And
.WithNCacheBackplane("ncache", "example_topic_name")
.WithNCacheCacheHandle("ncache", true);
},
loggerFactory);
3. Low-level configuration
Register the options directly against the static registry, then use the lower-level WithHandle /
WithBackplane APIs (no NCacheOptions is passed to either — both resolve it themselves by key):
var services = new ServiceCollection();
services.AddLogging(cfg =>
{
cfg.AddConsole();
cfg.SetMinimumLevel(LogLevel.Information);
});
var provider = services.BuildServiceProvider();
var loggerFactory = provider.GetRequiredService<ILoggerFactory>();
var options = new NCacheOptions
{
CacheName = "demoCache",
ServerList = new List<NCacheOptions.ServerConfig>
{
new NCacheOptions.ServerConfig
{
Ip = "127.0.0.1"
}
}
};
NCacheConfigurations.AddConfiguration("ncache_config_key", options);
var cache = CacheFactory.Build<string>("myCache", settings =>
{
settings.WithDictionaryHandle();
settings.WithHandle(
typeof(NCacheCacheHandle<>),
"ncache_config_key",
true);
settings.WithBackplane(
typeof(NCacheCacheBackplane),
"ncache_config_key",
"example_topic_name");
},
loggerFactory);
Note: the configuration key passed to
WithHandle/WithBackplanemust match a key already registered inNCacheConfigurations(via any of the three methods above) before the cache is built, or anInvalidOperationExceptionis thrown at instantiation time.
Configuration
Configure the connection to NCache through an NCacheOptions instance.
| Property | Description |
|---|---|
CacheName |
Name of the NCache cache. The cache must already exist on the server. |
ServerList |
List of NCache server nodes used to establish the connection. |
ServerConfig.Ip |
IP address or hostname of an NCache server. |
ServerConfig.Port |
Server port. Defaults to 9800 if not specified. |
The integration provides:
NCacheCacheHandle<T>— An NCache-backed CacheManager cache handle used to store cache entries. Resolves itsNCacheOptionsfromNCacheConfigurationsusing its configuration key.NCacheCacheBackplane— A CacheManager backplane implementation that uses NCache Messaging Service to propagate cache invalidation events across multiple application instances. Resolves itsNCacheOptionsthe same way.NCacheConfigurations— Static registry mapping a configuration key to anNCacheOptionsinstance.
When configured with a backplane, cache invalidation notifications are published through an NCache topic, allowing all connected CacheManager instances to keep their local caches synchronized.
Resources
Technical Support
Alachisoft provides various technical support resources.
Visit the Alachisoft Support Center to select a support resource appropriate for your issue.
To request additional features or report a documentation discrepancy, contact support@alachisoft.com.
License
Copyright © 2026 Alachisoft. All rights reserved.
| 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 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. 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.7.2
- Alachisoft.NCache.SDK (>= 5.3.7.2)
- CacheManager.Core (>= 3.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
-
.NETStandard 2.0
- Alachisoft.NCache.SDK (>= 5.3.7.2)
- CacheManager.Core (>= 3.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
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 | 118 | 8/6/2026 |