Goldpath.Caching 0.1.0-preview.8

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

Goldpath.Caching

Ring B caching: Microsoft HybridCache as the app surface (L1+L2, stampede-protected, tag invalidation) and Mediant [Cacheable]/[InvalidatesCache] as the query surface — composed, not wrapped. Goldpath adds the manifest-driven tier wiring and the tenant-scoped key convention.

Getting started

builder.AddGoldpathCaching();                 // L1 + Redis L2 (ConnectionStrings:redis)

// App surface — inject Microsoft's own type, no Goldpath wrapper:
public sealed class RateService(HybridCache cache, GoldpathCacheKeys keys)
{
    public async ValueTask<Rates> GetAsync(CancellationToken ct) =>
        await cache.GetOrCreateAsync(keys.For("rates", "current"),
            _ => FetchAsync(ct), tags: ["rates"], cancellationToken: ct);
}

// Query surface — Mediant's own attributes:
[Cacheable(300, CacheKeyPrefix = "rates")]
public sealed record GetRatesQuery : IQuery<Rates>;

Configuration

"Goldpath": {
  "DistributedCaching": {
    "Levels": ["l1", "l2"],          // ["l1"] = in-process only, no Redis dependency
    "RedisConnectionName": "redis",  // resolved from ConnectionStrings
    "DefaultTtlSeconds": 300
  }
}

Manifest: features.distributedCaching: { levels, redis.connectionName, defaultTtl }. In ["l1"] mode both surfaces stay fully in-process (memory distributed cache backs the query path) — unit tests and single-instance deployments need no Redis.

Advanced

  • Key convention (GoldpathCacheKeys): goldpath:{tenant}:{area}:{key} — tenant scoping is baked in BEFORE the MultiTenancy module lands, because retrofitting a key format means invalidating production caches, and cross-tenant cache bleed is a security bug. Inject GoldpathCacheKeys for ambient-tenant keys; GoldpathCacheKeys.Compose(tenant, area, key) for background/message flows.
  • Invalidation vocabulary: one area name across both surfaces — HybridCache tags on the app surface (RemoveByTagAsync("rates") works TODAY), CacheKeyPrefix on the query surface.
  • The composition loop, closed: the gaps this module filed upstream shipped in Mediant 1.2.0 and are composed here — the query path rides the SAME HybridCache (L1+L2 on [Cacheable] hits, mediant#130) and [InvalidatesCache] really invalidates, tag-based (mediant#131). The pinned no-op test broke on the version bump exactly as designed and now asserts the real semantics.
  • Stampede: both surfaces protected (HybridCache built-in; Mediant lock pool).

Providers

L2 = Redis (StackExchange; wire-compatible with Valkey/Garnet). Other L2 stores deferred until a project needs one (RFC D4) — YAGNI over a provider zoo.

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
0.1.0-preview.8 80 9/7/2026
0.1.0-preview.7 87 9/1/2026
0.1.0-preview.6 342 8/4/2026
0.1.0-preview.5 89 7/28/2026
0.1.0-preview.4 77 7/27/2026
0.1.0-preview.3 58 7/25/2026
0.1.0-preview.2 65 7/13/2026
0.1.0-preview.1 106 7/13/2026