RefreshAhead.MemoryCache.HealthChecks 1.1.2

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

RefreshAhead.MemoryCache.HealthChecks

A health check for RefreshAhead.MemoryCache. It reports the warm-up and refresh state of every registered refresh-ahead memory cache through Microsoft.Extensions.Diagnostics.HealthChecks.

This is a separate package so the core RefreshAhead.MemoryCache library stays lightweight and does not force a health-checks dependency on consumers that do not need it.

Install

dotnet add package RefreshAhead.MemoryCache.HealthChecks

Targets net8.0 and net10.0. Depends on RefreshAhead.MemoryCache.

Usage

builder.Services
    .AddHealthChecks()
    .AddRefreshAheadMemoryCaches();

It reports:

Status When
Unhealthy (or the configured failure status) a refresh loop faulted, or a cache is not warm after it was due to run.
Degraded a warm cache's latest attempt failed, or its last success exceeds an optional maximum age.
Healthy caches are operating normally, including delayed-first-run caches that are not due yet.

Per-cache running/faulted state, duration, next run, timestamps, counters, and errors are included in the health-check data.

Customize the registration:

builder.Services
    .AddHealthChecks()
    .AddRefreshAheadMemoryCaches(
        name: "caches",
        failureStatus: HealthStatus.Degraded,
        tags: ["ready"]);

Tagging with ready and mapping a readiness endpoint filtered on that tag pairs naturally with WarmUpOnStart: the pod reports not-ready until its caches are warm.

Scope a check to critical caches:

builder.Services.AddHealthChecks().AddRefreshAheadMemoryCaches(
    cacheNames: ["PriceCache", "ReferenceDataCache"],
    name: "critical-caches",
    tags: ["ready"]);

Or configure a maximum age for the last successful refresh:

builder.Services.AddHealthChecks().AddRefreshAheadMemoryCaches(
    maxAge: TimeSpan.FromMinutes(10));

See the main package documentation for details.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
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
1.1.2 125 10/16/2026
1.1.1 161 7/31/2026
1.1.0 153 6/15/2026