NCache.OSS.Hangfire 5.3.6.2

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

NCache Storage Provider for Hangfire

An NCache implementation of Hangfire job storage, backing queues, job data, state, and server registration with an NCache cluster instead of SQL Server or Redis.

This package plugs into Hangfire's JobStorage abstraction, so it can be used as a drop in storage provider anywhere Hangfire is configured including across multiple worker instances in a web farm, with jobs, queues, and state shared through the NCache cluster.

Features

  • Distributed Queues: FIFO job queues backed by NCache, with pub/sub driven wake up so workers are notified as jobs are enqueued instead of relying solely on polling.
  • Distributed Locking: Job state changes, counters, and queue mutations are coordinated through NCache backed distributed locks, safe across multiple server processes.
  • Server Registration & Heartbeats: Each Hangfire server announces itself, its queues, and its worker count into the cache, with automatic cleanup of servers that stop heartbeating.
  • Fetched Job Recovery: An orphan recovery process requeues jobs left in a "processing" state past the configured invisibility timeout, e.g. after a server crash.
  • Pub/Sub with Polling Fallback: Falls back to interval polling automatically if pub/sub notifications are disabled or unavailable.

Installation

dotnet add package NCache.OSS.Hangfire

Requirements

  • .NET Standard 2.0 / .NET Framework 4.6.2 or higher
  • An NCache client connection (Alachisoft.NCache.Client) to a running NCache OSS cache/cluster
  • References Hangfire.Core (1.8.24) and Alachisoft.NCache.Opensource.SDK

Usage

Point the client at your server

Set your NCache server IP in client.ncconf (copied to the output directory on build):

<cache id="myCache" enable-client-logs="False" log-level="error">
    <server name="YOUR_SERVER_IP"/>
</cache>

cache id must match the cache name you use in code. A config.ncconf ships alongside it holding cache-side settings.

Register NCache as the job storage

var cacheName = builder.Configuration.GetValue<string>("NCache:CacheName") ?? "myCache";

builder.Services.AddHangfire(config => config
    .UseNCacheStorage(cacheName));
 
  • First argument: your NCache cache name.

Configuration

To tune queue polling, lock timing, or terminal-state list sizes, pass an NCacheStorageOptions instance:

var storageOptions = new NCacheStorageOptions
{
    QueuePollInterval = TimeSpan.FromSeconds(60),
    InvisibilityTimeout = TimeSpan.FromMinutes(5),
    DistributedLockTimeout = TimeSpan.FromSeconds(30),
    LockAcquireMaxWait = TimeSpan.FromSeconds(15),
    EnablePubSubNotifications = true,
    SucceededListSize = 10000,
    DeletedListSize = 1000,
    FailedListSize = 1000
};

builder.Services.AddHangfire(config => config
    .UseNCacheStorage(cacheName, storageOptions));
Option Description
QueuePollInterval Polling interval used as a fallback when pub/sub notifications are disabled.
InvisibilityTimeout How long a fetched job stays hidden from other workers before it's eligible for orphan recovery.
DistributedLockTimeout Lease duration for distributed locks acquired against NCache.
LockAcquireMaxWait Maximum time to wait while attempting to acquire a distributed lock before giving up.
EnablePubSubNotifications Enables NCache topic-based wake up for queue fetches; falls back to polling when false.
SucceededListSize / DeletedListSize / FailedListSize Number of recent jobs retained per terminal state for the Dashboard.

Important

If NCache is not installed on the machine, you must ensure that client.ncconf and config.ncconf contain all required configuration information.

Documentation

Technical Support

Alachisoft® provides various sources of technical support.

License

Copyrights 2026: Alachisoft, all rights reserved.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.6.2 104 9/3/2026