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
<PackageReference Include="NCache.OSS.Hangfire" Version="5.3.6.2" />
<PackageVersion Include="NCache.OSS.Hangfire" Version="5.3.6.2" />
<PackageReference Include="NCache.OSS.Hangfire" />
paket add NCache.OSS.Hangfire --version 5.3.6.2
#r "nuget: NCache.OSS.Hangfire, 5.3.6.2"
#:package NCache.OSS.Hangfire@5.3.6.2
#addin nuget:?package=NCache.OSS.Hangfire&version=5.3.6.2
#tool nuget:?package=NCache.OSS.Hangfire&version=5.3.6.2
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) andAlachisoft.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.
- Refer to http://www.alachisoft.com/support.html to select a support resource suited to your issue.
- To request additional features, or report a discrepancy in this document, email support@alachisoft.com.
License
Copyrights 2026: Alachisoft, all rights reserved.
| Product | Versions 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. |
-
.NETFramework 4.6.2
- Alachisoft.NCache.Opensource.SDK (>= 5.3.6.2)
- Hangfire.Core (>= 1.8.24)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.0)
- System.Text.RegularExpressions (>= 4.3.1)
- System.ValueTuple (>= 4.6.2)
-
.NETStandard 2.0
- Alachisoft.NCache.Opensource.SDK (>= 5.3.6.2)
- Hangfire.Core (>= 1.8.24)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.0)
- System.Text.RegularExpressions (>= 4.3.1)
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 |