EntityFramework6.NCache
5.3.800
dotnet add package EntityFramework6.NCache --version 5.3.800
NuGet\Install-Package EntityFramework6.NCache -Version 5.3.800
<PackageReference Include="EntityFramework6.NCache" Version="5.3.800" />
<PackageVersion Include="EntityFramework6.NCache" Version="5.3.800" />
<PackageReference Include="EntityFramework6.NCache" />
paket add EntityFramework6.NCache --version 5.3.800
#r "nuget: EntityFramework6.NCache, 5.3.800"
#:package EntityFramework6.NCache@5.3.800
#addin nuget:?package=EntityFramework6.NCache&version=5.3.800
#tool nuget:?package=EntityFramework6.NCache&version=5.3.800
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
Prerequisites
- .NET Framework 4.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.
- Entity Framework 6 configured in your application.
- Ensure the entities being cached are serializable.
Getting Started
Setting up NCache
- Open your application's configuration file:
- .NET / ASP.NET Core:
appsettings.json - .NET Framework / ASP.NET:
app.configorweb.config
- .NET / ASP.NET Core:
- 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. - Set
serverto 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");
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.
- 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 Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Alachisoft.NCache.SDK (>= 5.3.800)
- EntityFramework (>= 6.1.3 && <= 6.5.2)
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.800 | 137 | 10/21/2026 |
| 5.3.7 | 177 | 8/4/2026 |
| 5.3.6.1 | 344 | 10/10/2025 |
| 5.3.6 | 336 | 8/13/2025 |
| 5.3.5 | 292 | 5/30/2025 |
| 5.3.2.1 | 3,459 | 7/3/2024 |
| 5.3.2 | 320 | 10/3/2023 |
| 5.3.0 | 1,027 | 4/12/2022 |
| 5.2.1 | 1,851 | 10/12/2021 |
| 5.2.0 | 850 | 9/15/2021 |
| 5.0.4 | 1,034 | 10/28/2020 |
| 5.0.3 | 1,089 | 6/15/2020 |
| 5.0.2 | 1,171 | 1/6/2020 |