New Features in NCache 5.0

Learn about significant new features in NCache 5.0 improving ease-of-use and integrating new .NET technologies. Importantly, NCache 5.0 stores ASP.NET Core Sessions as well as ASP.NET Session State, and caches ASP.NET View State in multi-server environments.

For a comprehensive list of all features in NCache, please read NCache Features.

Distributed Data Structures

NCache now has distributed data structures provided as implementations of .NET data structure interfaces. This includes Distributed List, Distributed HashSet, Distributed Dictionary, Distributed Queue, and Counter implementations are provided.

Full Text Search (Distributed Lucene.NET)

Lucene.NET is a famous full text search engine library written in .NET that is a port from Java. But, Lucene.NET is a stand-alone library suitable for a single instance usage.

NCache has taken this Open Source Lucene.NET project and transformed it into a Distributed Lucene.NET that is also Open Source and available at GitHub. The Distributed Lucene.NET allows .NET applications running in a high transaction multi-server environment to incorporate full text searching capability in a fast and scalable manner.

With NCache and Distributed Lucene.NET, you can do full text searching in a distributed environment.

Modern NCache API

NCache has completely revamped its legacy API and introduced a new modern API. Legacy API is still available for those people who’ve been using NCache already.

But, the new NCache API is much simpler and easy to use and reduces number of overloads in various methods. The new API is also using the latest features of C# and .NET Framework (Task Parallel Library, Async Methods and Generics).

New Management & Monitoring Tools (Web Based)

NCache has complete redesigned and freshly developed all its management and monitoring tools as web-based tools. Previously, NCache provided Windows desktop tools called NCache Manager and NCache Monitor. Now, all those features available through the new web-based tools.

Users can connect to any cache server from their browsers to start managing and monitoring their cache clusters remotely. Users can also manage both Windows and Linux based cache servers in the same way through the same tools.

Performance Improvements

Major performance improvements are made in this release. Core sub-systems are redesigned to by-pass some of the performance limitations surrounding Garbage Collection (GC) in .NET to gain better performance of cache operations.

Some of these improvements also include the incorporation of latest libraries like System.IO.Pipelines from Microsoft. System.IO.Pipelines is a new library that is designed to make it easier to do high performance IO in .NET.

JSON Serialization

NCache users can now configure the Cache to store JSON serialized objects instead of native .NET binary serialization. JSON serialization is more efficient but more importantly JSON provides portability to different languages. JSON also enables you to export data since JSON is a well-known standard.

JSON serialization means both .NET and Java applications are able to store their objects in a common JSON format. This also prepares NCache for supporting more languages than .NET and Java in future.

Location Affinity

Location affinity means keeping the related cache items on the same cache server in a multi-server configuration. Without this feature, all data is stored to its own appropriate partition in the cluster based on the “key” specified by the application. But, with location affinity, there is a “location qualifier” that is provided to all related items and they’re then kept on the same cache server.

This feature can be helpful in many ways like faster queries and bulk operations etc. It is also good if you’re running server-side code on a specific cache server that needs to access some data and all of its related data because it will find all of that data on the same local server.

NCache .NET Core Client & Server (Windows & Linux)

NCache 5.0 fully supports .NET Core 2.2 in both its clients and cache servers. This means that you can not only run your applications on Windows and Linux but also the cache servers can run on either Windows or Linux.

Previous NCache version only supported .NET Core on Linux but not Windows. Now, both platforms are supported.

SQL/LINQ Queries with Groups & Tags

NCache users can now write SQL/LINQ query that includes group name and/or tag name as part of the search criteria. Previously, you could not do that.

Pattern Based Subscription (Pub/Sub Messaging)

NCache 5.0 has enhanced its Pub/Sub Messaging capabilities to now allow you to create a Pattern Based Subscription that is mapped to multiple topics. You can specify the topic names through a Wildcard pattern in this subscription. And, it not only maps you to all the existing topics that match this pattern but also looks for any new topics added at runtime matching the same pattern and automatically subscribes to them.

Pattern can be identified using *, ? and [] wildcards along with multiple delivery options.

Durable Subscription (Pub/Sub Messaging)

NCache 5.0 has enhanced the Pub/Sub Messaging to provide durability of messages even if the subscriber clients disconnect with the cache for any reason. In previous versions, only those clients would get the message who were connected to the caching tier currently. And, if a client disconnected for any reasons, it didn’t receive the message.
But, now even if a client disconnects, its messages are preserved until the client reconnects and then all these messages are delivered to the client.

Durable Subscriptions can either be Exclusive which means it only has subscribing client. Or they can be Shared which means they’re named and multiple clients can subscribe to them and will receive the messages.

Partition-Replica Scheduled Maintenance Support

NCache 5.0 now allows you to bring a cache server down in “scheduled maintenance mode”. If you do that, then NCache does not automatically repartition the cluster because it knows that this cache server being brought down will come back up shortly. So, it keeps the current partition map intact and temporarily starts using one of the “Replicas” as an Active Partition.

Then, when you bring the node back up, it obtains the latest data from its replica and reestablishes itself as the active partition.

Without Scheduled Maintenance Support, NCache would assume that a node that goes down has crashed and gone away and then NCache immediately repartitioned the cluster. And, if the cache was huge, this meant a lot of data being repartitioned. And, then when the node was brought back up, this data would have to be repartitioned back to its original state. And, all of this was very costly but it is no longer needed.

Server-Activated Client Licensing

NCache 5.0 has introduced a very convenient way for you to license all your cache clients, namely through cache servers. You can now activate your client licenses at cache server level instead of individually activating each cache client. Then, cache servers determine at runtime whether they have sufficient client licenses to allow further client connections or not.

You can also increase or decrease the number of activated client licenses very easily.

Fluctuating Licenses for the Cloud (Pay for Usage)

For Azure and AWS clouds, NCache 5.0 now allows you to fluctuate the licenses based on your actual usage of client and server licenses instead of fixed licenses. This allows you to save money on licenses when your usage drops and add more licenses on a seasonal basis when the usage goes up.

Under the new licensing scheme in Azure and AWS, you purchase an annual subscription for a baseline number of licenses. Then, if your actual usage increases from the baseline in a given month, then you’re charged for the extra usage just for that month (on a quarterly basis). And, if your actual usage drops from the baseline in a given month, then you’re given “store credit” against which you can adjust any future over-usage without paying for it.

Recovery from Split-Brain

Split-Brain is a situation where due to temporary network failures between cluster nodes result in multiple sub clusters. Each sub cluster, in this case, has its own coordinator node and does not know about the other sub clusters. This can eventually result in inconsistent data.

With NCache 4.9, users can enable the cache clusters to automatically recover from Split-Brain scenarios.

ASP.NET Core Response Caching

NCache's implementation of IDistributedCache utilizes Distributed Cache Tag Helper that provides the ability to dramatically improve the performance of your ASP.NET Core app by caching its responses.

Major Performance Improvements

There is 20-25% performance improvement in basic ADD, INSERT and GET cache operations.

.NET Core Client

NCache provides a totally native .NET Core Client that can run on both Windows and Linux. The NCache .NET Core Client supports InProc and OutProc Client Cache, on both Windows and Linux.

On Windows, the NCache .NET Core client is installed through a Windows Installer (.msi). On Linux, the .NET Core client is provided through a .tar.gz installer.

Docker Support

NCache fully supports Docker for cache clients, in addition to cache servers. This enables .NET applications deployed in Docker to seamlessly include the NCache Client. Docker support enables deployment of all NCache servers in the caching tier in Docker and makes NCache deployment very easy.

NCache Server and NCache Client are both available in the Docker Hub to include in your Docker configuration.

ASP.NET Core Session Provider & IDistributedCache

NCache provides full ASP.NET Core support, in addition to the previously available ASP.NET in the .NET Framework.

NCache includes a powerful ASP.NET Core Session Provider that has more features than the regular ASP.NET Session Provider. And, it supports the IDistributedCache interface in ASP.NET Core.

Publish/Subscribe (Pub/Sub) with Topic

The Publish/Subscribe (Pub/Sub) messaging paradigm is provided where a publisher sends messages into channels, without knowing the subscribers (if any). And subscribers receive only messages of interest, without knowing who the publishers are.

NCache provides named Topic support through which a publisher sends messages to multiple subscribers or to any one among them. And, subscribers can subscribe to a named Topic, and its callback is called by NCache when a message arrives against this Topic.

Entity Framework Core (EF Core) 2.0 Extension Methods for NCache

NCache has very easy to use EF Core 2.0 Extension Methods that cache application data fetched through EF Core 2.0. Although Extension Methods require some minimal coding, it is a small effort and it yields a lot of control over which data to cache and for how long.

Transport Level Security (TLS) 1.2

All communication from NCache clients to NCache servers can now be optionally secured through TLS 1.2 (a newer specification than SSL 3.0). TLS is the same protocol used by HTTPS to ensure a secured connection between the browser and a web server.

TLS 1.2 ensures all data traveling between NCache clients and NCache servers is fully encrypted and secured. Please note that encryption/decryption on NCache clients and NCache servers has a slight performance impact.

Total Cache Management Through PowerShell

NCache has a rich set of command line tools (along with powerful GUI-based management tools). With NCache 4.8, all NCache command-line cache management tools are implemented in PowerShell, allowing for very sophisticated cache management.

Cache Server-Only Licensing Option

Traditionally, NCache provided client/server licensing, requiring both cache clients and cache servers to be licensed. Going forward, NCache provides a “server-only” license option, with the cache clients included in the server license. The server-only licensing option is available from your account manager.

Cache Client Keep Alive

Some firewalls break idle network connections, causing problems in cache client-to-cache server communication in NCache. The Cache Client Keep Alive feature, if enabled on a client node, automatically sends a lightweight packet to the cache servers at a configurable interval (a sort of heart-beat). These packets are sent only in case of “no activity” between clients and servers and therefore do not interfere with regular client/server traffic.

Thin NCache Manager Project Files

The GUI-based NCache management tool (called NCache Manager) used to retain cache configuration information inside its project file. This causes data integrity issues if multiple cache configuration modifications were input on different machines. To avoid this, NCache Manager no longer stores any cache configuration information inside its project files. Instead, all configuration information is kept on common cache servers, accessed from any location.

ASP.NET SignalR Backplane Provider

With NCache 4.6 SP3, the cache can distribute messages across all applications that use SignalR provider deployed on any combination of NCache servers and clients.

ASP.NET Core Sessions Provider

NCache now supports ASP.NET session storage provider for ASP.NET Core applications.

Optimized Client Cache Performance and Memory Optimization

The client cache is optimized to synchronize itself with the clustered cache. Instead of receiving an event on each update made to the clustered cache, the client cache receives events in bulk at a configurable interval. This reduces traffic and memory usage.

Monitoring Cache Clients from API

A new API is introduced to monitor cache clients connected with a cluster. Using this API, a list of connected clients can be fetched, and notifications can be registered when any new client connects or any existing client disconnects.

Same Name Caches across Bridge

The NCache bridge topology can now have caches with identical names.

Distributed Cache Loader

The cache loader in NCache can now run on multiple nodes which speeds up cache loading.

FIPS-Compliant AES Encryption

FIPS-Compliant AES encryption is introduced in SP2.

ASP.NET Core Session Provider

NCache ASP.NET session storage provider for ASP.NET Core applications is now supported.

Big Data In-Memory Processing

MapReduce in NCache will allow developers to write programs that process massive amounts of unstructured data in parallel across a NCache cluster. To distribute input data and analyze it in parallel, MapReduce operates in parallel on all nodes in a cluster of any size.

Aggregator processes data records and returns compiled results. It groups values from multiple sources and can perform variety of operations like sum up values, calculating averages, finding minimum/maximum values etc. and returns single result.

Entry Processor: NCache provides the ability to execute users' code on server side against a set of cache entries. Entry processors can modify cache entries on the server side without involving these entries to travel on the network for fetch and update operations.

Live Upgrade of NCache

NCache 4.4 SP2 can be upgraded to NCache 4.6 without losing any data using its Bridge topology.

Query Optimizations

Data Reader: Queries can now be executed on cache using data reader just like the databases do. Using data reader, result set can be retrieved from servers in multiple chunks of configurable size. This approach gives a better performance and uses less memory on client end.

Order-by-Clause: Select statements can now have orderby clause which will return the result set sorted on one or more specified attributes.

Log Viewer Tool

A GUI tool to view and monitor logs generated by NCache server and clients in one place. Log files of all servers can be viewed in same tool. The tool can filter log entries and important log entries can also be bookmarked.

Other Enhancements

Object Data Format: NCache cache can now be configured to store data in objects form. By default, all data is stored in binary form.

Separate Process for Cache: Each cache in NCache is now hosted in its own process which runs independent of all other caches. Management of this process is done via NCache service which has information about all the cache processes running on the machine.

Cache Level Default Expiration: User can now configure NCache with default named expirations. NCache server will use default expirations when items are either inserted into cache without any expirations or inserted explicitly with named default.

DumpCacheData Tool

NCache now provides a tool through which a dump of the cache data can be written to a location specified by the user. This tool is designed for customers that need to restart their cache servers and they want to save their business critical data being held in the cache before restarting. The DumpCacheData tool enumerates cache data in a running cache and stores this data to any specified location. This data can then be reloaded to a new cache or the same cache.

LINQPad Integration

NCache provides integration with the popular .NET utility, LINQPad so you can use LINQPad to query cache data. The resulting data is shown in the LINQPad console in tabular form. LINQPad is a software utility often used to interactively query SQL databases using LINQ, as well as to interactively write C# without the need for an IDE.

HotApplicable Settings in Service Configuration

Some settings in NCache can now be changed on running caches without the need to restart the cache. We call this "HotApplicable". Previously, changing settings in the service configuration file, such as NCacheServer.LicenseLogging and NCacheServer.EnableDebuggingCounters required restarting the cache. The list of HotApplicable settings are provided here.

Visual Studio Integration

NCache can now be integrated with Visual Studio 2010/2012/2013 (Enterprise). Basic management and configuration operations can now be performed within the Visual Studio. NCache Developer installation now comes with an 'NCache Manager' extension which helps developers manage NCache from Visual Studio.

Entity Framework 6.0 Support

Entity Framework 6.0 and 6.1 integration is provided in NCache. NCache also provides caching extensions for Entity Framework 6.0 which allows developers more control over which entities to cache. This is available for developers who want greater control over the entities being cached, as an alternate to the 'no-code-change configuration' option.

Windows Server 2012 R2 Certification

NCache is certified for Windows Server 2012 R2. It has been tested by Microsoft's approved tester and passed all compatibility tests. Microsoft validated that NCache works in accordance with Microsoft's standards.

NCache SDK NuGet Package

NuGet is a package manager for Microsoft Visual Studio development in .NET. The NuGet Gallery is a central repository of all NuGet packages.

A NuGet package is provided for developers to build applications using NCache without installing NCache on their machines. With this package, developers can write their applications using an NCache API and test them with InProc cache. This gives you full control to use NCache SDK without installing it.

NCache is Now Open Source

NCache is also available as Open Source. NCache Open Source is released under the Apache 2.0 Open Source license. This provides the .NET developer community with unrestricted access to a truly elastic native .NET Distributed Cache. For more details please refer to the Edition Comparison page.

Signup for monthly email newsletter to get latest updates.

Contact Us


+1 (214) 764-6933 (US)

+44 20 7993 8327 (UK)

© Copyright Alachisoft 2002 - . All rights reserved.