NCache.Microsoft.Extensions.Caching 5.3.800

dotnet add package NCache.Microsoft.Extensions.Caching --version 5.3.800
                    
NuGet\Install-Package NCache.Microsoft.Extensions.Caching -Version 5.3.800
                    
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="NCache.Microsoft.Extensions.Caching" Version="5.3.800" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NCache.Microsoft.Extensions.Caching" Version="5.3.800" />
                    
Directory.Packages.props
<PackageReference Include="NCache.Microsoft.Extensions.Caching" />
                    
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 NCache.Microsoft.Extensions.Caching --version 5.3.800
                    
#r "nuget: NCache.Microsoft.Extensions.Caching, 5.3.800"
                    
#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 NCache.Microsoft.Extensions.Caching@5.3.800
                    
#: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=NCache.Microsoft.Extensions.Caching&version=5.3.800
                    
Install as a Cake Addin
#tool nuget:?package=NCache.Microsoft.Extensions.Caching&version=5.3.800
                    
Install as a Cake Tool

NCache.Microsoft.Extensions.Caching

An implementation of Microsoft.Extensions.Caching backed by NCache, allowing ASP.NET Core and .NET applications to use NCache as a distributed cache with minimal code changes. It integrates seamlessly with the Microsoft.Extensions.Caching.Distributed.IDistributedCache abstraction, making it a drop-in replacement for in-memory caching or other distributed cache providers — and can also be used for ASP.NET Core Response Caching.

Installation

Install-Package NCache.Microsoft.Extensions.Caching

or, using the .NET CLI:

dotnet add package NCache.Microsoft.Extensions.Caching

Prerequisites

  • .NET 6.0+ or .NETFramework4.6.2+ Application.
  • NCache SDK 5.3.800 or later.
  • An NCache 5.3.800 (or later) server should be up and running, with the target cache already created/registered on it.

Getting Started

Setting up NCache

  1. Open your application's configuration file:
    • .NET / ASP.NET Core: appsettings.json
    • .NET Framework / ASP.NET: app.config or web.config
  2. Add an entry for the cache you created on the NCache server, keyed by the cache's name. The example uses defaultCache; replace it with your cache's name.
  3. Set server to one or more nodes of the cluster where that cache is running. Separate multiple nodes with commas.

appsettings.json

{
  "ncache": {
    "defaultCache": {
      "server": "20.200.20.24,20.200.20.25",
      "port": 9800
    }
  }
}

app.config / web.config

<configuration>
  <configSections>
    <section name="ncache" type="Alachisoft.NCache.Client.NCacheSection, Alachisoft.NCache.Client" />
  </configSections>
  <ncache>
    <caches>
      <add name="defaultCache" server="20.200.20.24,20.200.20.25" port="9800" />
    </caches>
  </ncache>
</configuration>

The cache name in the configuration must match the name you pass in code:

ICache cache = CacheManager.GetCache("defaultCache");

Setting up Package

  1. Register NCache as the application's distributed cache provider in Program.cs:

    builder.Services.AddNCacheDistributedCache(options =>
    {
        options.CacheName = "YourCacheName";
        options.EnableLogs = false;
        options.ExceptionsEnabled = true;
    });
    
  2. Inject IDistributedCache anywhere in your application to use the cache:

    using Microsoft.Extensions.Caching.Distributed;
    
    public class ProductService
    {
        private readonly IDistributedCache _cache;
    
        public ProductService(IDistributedCache cache)
        {
            _cache = cache;
        }
    
        public async Task SetValueAsync()
        {
            await _cache.SetStringAsync(
                "product:1",
                "Laptop",
                new DistributedCacheEntryOptions
                {
                    AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(10)
                });
        }
    
        public async Task<string?> GetValueAsync()
        {
            return await _cache.GetStringAsync("product:1");
        }
    }
    

    The implementation supports all standard IDistributedCache operations: Get() / GetAsync(), Set() / SetAsync(), Refresh() / RefreshAsync(), and Remove() / RemoveAsync().

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 Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on NCache.Microsoft.Extensions.Caching:

Package Downloads
Liquid.Cache.NCache

Distributed cache extension of NCache.Microsoft.Extensions.Caching. This component is part of Liquid Application Framework.

PiCache

PiCache

CachingService

Generic Caching Library

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on NCache.Microsoft.Extensions.Caching:

Repository Stars
Avanade/Liquid-Application-Framework
Liquid Application Framework documentation, useful links and sample project
referbruv/ContainerNinja.CleanArchitecture
ContainerNinja is a boilerplate template project to demonstrate building a multi-container Full Stack application with ASP.NET Core (.NET 6) Web API following Clean Architecture, and Angular.
Version Downloads Last Updated
5.3.800 0 10/21/2026
5.3.7 347 7/31/2026
5.3.6.1 3,617 10/10/2025
5.3.6 900 8/12/2025
5.3.5 392 5/30/2025
5.3.3 12,252 2/1/2024
5.3.1 15,392 9/12/2022
5.3.0 4,276 4/12/2022
5.2.1 4,582 10/12/2021
5.2.0 17,724 3/25/2021
5.1.0 12,047 11/23/2020
5.0.4.1 1,961 11/4/2020
5.0.4 2,210 10/28/2020
5.0.3 22,179 6/15/2020
5.0.2 2,459 1/17/2020