Goldpath.Caching
0.1.0-preview.8
dotnet add package Goldpath.Caching --version 0.1.0-preview.8
NuGet\Install-Package Goldpath.Caching -Version 0.1.0-preview.8
<PackageReference Include="Goldpath.Caching" Version="0.1.0-preview.8" />
<PackageVersion Include="Goldpath.Caching" Version="0.1.0-preview.8" />
<PackageReference Include="Goldpath.Caching" />
paket add Goldpath.Caching --version 0.1.0-preview.8
#r "nuget: Goldpath.Caching, 0.1.0-preview.8"
#:package Goldpath.Caching@0.1.0-preview.8
#addin nuget:?package=Goldpath.Caching&version=0.1.0-preview.8&prerelease
#tool nuget:?package=Goldpath.Caching&version=0.1.0-preview.8&prerelease
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. InjectGoldpathCacheKeysfor ambient-tenant keys;GoldpathCacheKeys.Compose(tenant, area, key)for background/message flows. - Invalidation vocabulary: one
areaname across both surfaces — HybridCache tags on the app surface (RemoveByTagAsync("rates")works TODAY),CacheKeyPrefixon 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 | Versions 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. |
-
net10.0
- Goldpath.Abstractions (>= 0.1.0-preview.8)
- Mediant.Behaviors (>= 1.4.1)
- Microsoft.Extensions.Caching.Hybrid (>= 10.9.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
-
net8.0
- Goldpath.Abstractions (>= 0.1.0-preview.8)
- Mediant.Behaviors (>= 1.4.1)
- Microsoft.Extensions.Caching.Hybrid (>= 10.9.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
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 |