Bodu.Globalization.Calendar.Caching.Distributed 1.3.0

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

Bodu.Globalization.Calendar.Caching.Distributed

API stability - Stable. The public API surface is committed: breaking changes are reserved for a major-version bump per SemVer, except a deliberate break that is recorded in the release notes and in the package's CompatibilitySuppressions.xml. See versioning and support.

A shared storage backend for the Bodu.Globalization.Calendar.Caching notable-date cache, over any Microsoft.Extensions.Caching.Distributed.IDistributedCache - Redis, SQL Server, or any other implementation. One instance computes a civil year; every instance reads it.

Backend selection and the full options surface are covered in Backends and options; the caching model itself is in Caching notable dates.

Installation

dotnet add package Bodu.Globalization.Calendar.Caching.Distributed

Targets net8.0 and net10.0. The cache types live in the Bodu.Globalization.Calendar.Caching namespace, alongside the other backends; the AddDistributedNotableDateCache and AddRedisNotableDateCache registrations live in Bodu.Globalization.Calendar.

services.AddDistributedNotableDateCache(/* … */);   // any IDistributedCache
services.AddRedisNotableDateCache(/* … */);         // Redis convenience overload

What it adds

Type Role
DistributedNotableDateCache INotableDateCache over any IDistributedCache
DistributedNotableDateCacheOptions Key prefix and entry configuration
DistributedNotableDateCacheExtensions The AddDistributedNotableDateCache / AddRedisNotableDateCache registrations

It is a storage backend only - the caching policy (per-year units, time-to-live plus resource-version invalidation, single-flight cold misses, best-effort storage) lives in CachingNotableDateService and is identical across every backend.

Three consequences worth knowing for a shared cache. Single-flight coalescing is per process, so each instance may compute a cold year once. The resource-version token is only as shared as its source: a fixed NotableDateCachingOptions.ResourceVersion means the same in every process, so set one that changes with the data (a release or content version) and no process serves an entry written under another. A token derived from an observed resource provider - the case under AddReloadableNotableDateService, where ResourceVersion is ignored - is process-local: each process counts its reloads from 1, so a process still on old data and one started on new data share a token, and a process that reloads prunes the entries the others wrote. Share this cache between processes with a fixed version rather than a reloadable service. And the best-effort contract matters more here than on local storage: a failed read is a miss and a failed write is skipped, so an unreachable Redis degrades to recomputation rather than an outage.

Choosing a backend

Use this package when instances should share computed years. For durability on a single machine use …Caching.Sqlite; for a single short-lived process the in-memory backend in the core caching package is enough.

Part of the Bodu utility library.

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.3.0 120 10/16/2026
1.0.0 1,211 9/24/2026
0.7.0 507 9/24/2026
0.6.0 119 9/24/2026