NCache: a distributed in-memory cache for .NET with a Docker path
NCache: Highly Scalable Distributed Cache for .NET
At a glance
- What is it?
- NCache is an Apache-2.0 distributed cache for .NET applications from Alachisoft, offering pub/sub, bulk CRUD, item locking, event notifications, SQL searching, distributed data structures and WAN replication, with ASP.NET session state and NHibernate providers. It ships as a Windows service or a Docker image, and the open source edition sits beside a commercial enterprise edition.
- Who is it for?
- NCache suits .NET teams that need a shared cache across application servers, that want ASP.NET session state or NHibernate second level caching handled by the same product, or that want SQL querying and pub/sub on top of a key value cache.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 77 days ago.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A shared cache for multi-server .NET applications
NCache is an open source distributed cache for .NET applications, published by Alachisoft, and the README names the uses it is meant for: database caching, ASP.NET Session State storage, ASP.NET View State caching and more.
That list tells you the audience. A single in-process cache is enough for one application on one machine. NCache exists for the case where several application instances need to see the same data, where a session created on one web node has to be readable on another, or where a database is being hammered by repeated identical reads.
The framing in the README is that NCache is used by hundreds of companies in mission critical applications. That is a vendor claim in a project README, and it is not something the repository can substantiate, so treat it as marketing context rather than evidence. The technical claims are more concrete: the product is a distributed cache with a cluster concept, a live cluster configuration feature and WAN replication, which is the part that matters for anyone running nodes across sites.
Licensing is Apache-2.0 for the open source edition, and the vendor publishes an edition comparison page that contrasts the Enterprise Edition with the Open Source Edition. That distinction is the most important thing to check before designing around it, and it comes up again below.
Far more than get and set: locks, events, eviction and SQL search
The feature list is long, and a few entries are worth reading twice because they push NCache away from the plain key value cache shape.
Beyond cache CRUD operations and bulk CRUD operations, the list includes exclusive locking of cached items, which lets a client take exclusive ownership of an entry for the duration of a read-modify-write cycle. That is the difference between a cache you can invalidate and one you can use with a workflow that must not interleave.
Item level event notifications mean a client can subscribe to changes on a specific key rather than polling, and the Publish and Subscribe with Topic feature adds a channel on top of that, so a process can broadcast a message to any number of subscribers without them holding a reference to each other.
Eviction and the two expiration policies, absolute and sliding, decide what happens when memory fills up and when an entry becomes stale. SQL Searching is the entry that surprises people, since it implies you can query cached data by attribute rather than only by key, and Distributed Data Structures give shared higher level objects to work with instead of raw keys.
The last two entries, live cluster configuration and WAN replication, are the operational features. Live cluster configuration implies you can change cluster settings without taking the cluster down, and WAN replication covers the case where your nodes are in different data centres.
Session state, view state and NHibernate come with the product
Three of the features are really integrations, and they are the reason a .NET team might pick NCache rather than a general purpose cache library.
The ASP.NET Session State Provider makes the cache the backing store for session, so session state survives an application restart and is shared between nodes. The ASP.NET View State Cache does the equivalent for view state, which is a different problem with a different lifetime, and treating it separately matters for applications with heavy view state payloads. The NHibernate Second Level Cache provider plugs NCache into NHibernate's second level cache, which is the place where an ORM's cached entities usually stop being visible to the rest of your application.
These are the features that decide the comparison against rolling your own cache layer, and they are also the features most likely to differ between the open source and enterprise editions, since they each involve a provider that has to be configured and version-matched.
Beyond the built-in features, the ecosystem is spread across sibling repositories. NCache-Samples holds demonstration applications that show the features in use, and NCache-Integrations collects official integrations with popular libraries and frameworks. NuGet packages are listed among the features, so the client side is distributed the standard .NET way while the server side is a separate install.
Windows install is an MSI, a wizard and a running service
The README describes four setup routes: installing it directly as a cache server, which it calls the default, as a remote client, as a Dev or QA environment, or running it inside a Docker container. The Windows path is the one documented in full.
Step one is the MSI installer downloaded from Alachisoft, run from a command prompt:
msiexec.exe /I "C:\NCacheSetupPath\ncache.oss.x64.msi"The package name in that command identifies the open source x64 build, which is a small but useful detail, since the vendor also ships a commercial installer.
Step two is the setup wizard, where the README tells you to select Cache Server when prompted for the installation type, and it links the Windows Server Installation docs for the step by step version. Step three is making sure the NCache service is running, because a cache server that is installed but stopped serves nothing.
The rest of the guidance is documentation rather than README prose. There is an Installation Guide for the open source edition and how to configure the environment, an Admin Guide for administrative tasks on caches using configuration files, a Programmers Guide for using the features in .NET code, and a Docker guide covering the image and the Dockerfile for building NCache environments and managing cache clusters.
The Docker path pulls, creates with host networking, then registers
The container route is the more interesting of the two documented installs, because the README gives three concrete commands and the middle one is unusual.
Official images are on Docker Hub under alachisoft/ncache, and the first step pulls the open source tag:
docker pull alachisoft/ncache:latest-ossThe second step creates the container using host network mode:
docker create --name ncache --network host alachisoft/ncache:latest-ossHost networking is the point worth pausing on. A cache cluster has members that need to reach each other and clients that need to reach the cluster, and host networking removes the port mapping layer, which also means the container's ports sit directly on the host network. For a cluster, that is usually what you want, and it also means you have to think about which interfaces the service binds to.
The third step registers the container as a cache server from the host terminal, and the command names a tool called register-ncacheevaluation and takes a key:
docker exec -it ncache /opt/ncache/bin/tools/register-ncacheevaluation -key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -registeras CacheServerThe presence of an evaluation registration tool in the documented Docker path is a detail to note. Before planning a deployment, check the current Docker guide at the vendor's documentation site for whether the same tool and key flow still applies to the open source image.
Open source edition, enterprise edition and what the repository contains
The repository itself is not the product. The top level holds .gitignore, a Docs/ directory, a LICENSE, the README, Resources/ and Src/, which is a small footprint for a distributed caching platform with a client API, admin tooling, providers and a management console. Most of the substance lives in the vendor's documentation, the installers, the Docker images and the separate NCache-Samples and NCache-Integrations repositories.
That matters for anyone planning to build from source or to audit the code, because the repository gives you far less than the product delivers. It also means the practical dependency for most teams is the vendor's binary distribution rather than a source checkout.
The open source edition is licensed under Apache License, Version 2.0, and the README directs readers to the download page for the details. Alongside it the vendor sells an Enterprise Edition, and the edition comparison page exists specifically to set the two apart. The README is candid that this is a split, and a team evaluating NCache should treat that page as a required reading, because features such as WAN replication, distributed data structures or the provider integrations are exactly the kind that tend to sit on one side of the line.
For a product with a commercial sibling, the open source edition's limits are usually where the interesting trade-offs are, and the README does not enumerate them.
An irregular release history and a recent push
The tagged releases tell an unusual story. The listing shows v5.3.6.2, named NCache 5.3 SP6 Open Source, dated 2026-07-07, then v5.0.0_SP2 from 2020-01-15 and v4.6.0_SP3 from 2018-03-08.
Two observations follow. The recent open source release follows a service pack naming pattern rather than the v4 and v5 major version lines, and the two older tags are far behind it, so the visible tag list is not a smooth version history. The last push to the repository was on 2026-08-07, a month after the 5.3.6.2 tag, so the branch carries changes newer than the packaged open source build.
Practically, this means the release you install and the source you read are not necessarily the same thing, and the branch is moving faster than the tags. A team that needs a specific behaviour should test the exact build they intend to run rather than assuming the tag matches the repository head.
The Apache-2.0 licence on the open source edition is permissive and adds no copyleft obligation, so embedding the client in a proprietary application is straightforward. Read the LICENSE file for the terms themselves, since the README only states the licence name.
Editorial conclusion
NCache suits .NET teams that need a shared cache across application servers, that want ASP.NET session state or NHibernate second level caching handled by the same product, or that want SQL querying and pub/sub on top of a key value cache. It does not suit a team wanting a single process cache with no server to run, and it does not suit you if the features you need sit in the enterprise edition, since the open source build is licensed separately and the README points at an edition comparison page. Check three things before you commit: whether the specific features you need are in the open source edition, whether the Docker image registers cleanly as a Cache Server on your network, and whether the .NET runtime versions you target are supported by the release you plan to run. The most recent tagged release is v5.3.6.2 from 2026-07-07 and the last push to the repository was on 2026-08-07.
Frequently asked questions
How do I install NCache on Windows Server?
Download the MSI from Alachisoft and run msiexec.exe /I "C:\NCacheSetupPath\ncache.oss.x64.msi", then follow the setup wizard and select Cache Server as the installation type, and finally make sure the NCache service is running.
How do I run NCache in Docker?
Pull the open source image with docker pull alachisoft/ncache:latest-oss, create the container with docker create --name ncache --network host alachisoft/ncache:latest-oss, and then register it as a Cache Server using the register-ncacheevaluation tool inside the container.
What can NCache do beyond caching key value pairs?
The feature list includes publish and subscribe with topics, bulk CRUD operations, locking of cached items, item level event notifications, eviction, absolute and sliding expirations, SQL searching, distributed data structures, live cluster configuration and WAN replication.
Does NCache work with ASP.NET session state and NHibernate?
Yes. The features list an ASP.NET Session State Provider, an ASP.NET View State Cache and an NHibernate Second Level Cache provider, and separate NCache-Samples and NCache-Integrations repositories hold demonstrations and official integrations.
What licence does NCache Open Source use?
The README states that NCache Open Source is released under the Apache License, Version 2.0, with the details on the vendor download page. The vendor also publishes an Enterprise Edition and an edition comparison page.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/alachisoft-ncache)Was this useful?