EntityFramework6.NCache 5.3.7

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

NCache Entity Framework 6

NCache Entity Framework 6 integration extends Entity Framework 6 with distributed query caching capabilities, allowing applications to cache the results of Entity Framework queries transparently. By intercepting database commands, repeated queries can be served directly from NCache, reducing database load and improving application performance.

The integration works without requiring changes to existing LINQ queries. Once configured, query caching is automatically applied through the Entity Framework command interceptor.

Key benefits:

  • Distributed query caching for Entity Framework 6
  • Transparent caching without modifying existing queries
  • Supports both transactional and reference data caching
  • Reduces repetitive database queries
  • Improves application scalability and performance

Installation

Install-Package EntityFramework6.NCache

or, using the .NET CLI:

dotnet add package EntityFramework6.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. The EntityFramework6.NCache package installed.
  3. Entity Framework 6 configured in your application.
  4. Ensure the entities being cached are serializable.

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 myCache 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="myCache" ... >
  <server name="10.0.0.1" ... />
</cache>

Replace:

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

Entity Framework Configuration

To enable query caching, register the NCache Entity Framework command interceptor in the entityFramework section of your application's configuration file.

<entityFramework>
  ...
  <interceptors>
    <interceptor type="Alachisoft.NCache.Integrations.EntityFramework.Caching.EFCommandInterceptor, Alachisoft.Integrations.EntityFramework.CachingProvider" />
  </interceptors>
</entityFramework>

Once the interceptor is registered, Entity Framework queries are automatically intercepted and cached by NCache.

Query Caching

NCache transparently caches Entity Framework queries executed through your DbContext. The first execution retrieves data from the database and stores the results in NCache. Subsequent executions of the same query are served directly from the cache, reducing database round-trips and improving application performance.

No changes to existing LINQ queries are required.

References

Reference documentation is available at:

https://www.alachisoft.com/resources/docs/ncache/prog-guide/entity-framework.html

Resources

Technical Support

Alachisoft© provides various sources of technical support.

Copyright � 2026 Alachisoft.

Product Compatible and additional computed target framework versions.
.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

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 128 8/4/2026
5.3.6.1 317 10/10/2025
5.3.6 304 8/13/2025
5.3.5 267 5/30/2025
5.3.2.1 3,176 7/3/2024
5.3.2 297 10/3/2023
5.3.0 997 4/12/2022
5.2.1 1,814 10/12/2021
5.2.0 825 9/15/2021
5.0.4 1,007 10/28/2020
5.0.3 1,068 6/15/2020
5.0.2 1,144 1/6/2020