![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Caching --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Caching -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Caching" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Caching" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Caching" />Project file
paket add Rig.TUnit.Caching --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Caching, 0.1.0-beta.2"
#:package Rig.TUnit.Caching@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Caching&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Caching&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Caching family-base:
CacheRigBuilder<TSelf>+CacheAssert(Stampede, TagInvalidation, Coherent, FailSafe, NegativeCached, HitRate, EagerRefresh) +StampedeTester+BackplaneCapture+ClockControl.
The shared contract for the Caching family. Defines ICacheRig,
CacheFixtureBase, and the novel CacheAssert fluent API with
assertions for the seven cache-quality dimensions that matter in
production: stampede prevention, tag-based invalidation coherence,
distributed-cluster coherency, fail-safe read-through, negative-caching,
hit-rate targets, and eager-refresh semantics. ClockControl wraps
FakeTimeProvider so TTL tests run instantly.
Concrete providers: .Memory, .Redis, .Hybrid, .Fusion.
Microsoft.Extensions.TimeProvider.Testing (transitive)using Rig.TUnit.Caching.Helpers;
using Rig.TUnit.Core.Builder;
using Rig.TUnit.Core.Helpers;
var rig = new RigBuilder()
.WithIsolation(IsolationKey.FromExecutionContext())
.Build();
var clock = new ClockControl();
await using var _ = rig;
| Property | Type | Default | Description |
|---|---|---|---|
DefaultTtl |
TimeSpan |
5m |
Starting TTL for cache entries |
EnableStatistics |
bool |
true |
Track hit/miss counts |
NegativeCacheTtl |
TimeSpan |
30s |
TTL for null / not-found entries |
StampedePreventionWindow |
TimeSpan |
500ms |
Coalesce concurrent loaders |
Rig.TUnit.Caching.ICacheRigRig.TUnit.Caching.Fixtures.CacheFixtureBaseRig.TUnit.Caching.Builder.CacheRigBuilder<TSelf>Rig.TUnit.Caching.Assertions.CacheAssertRig.TUnit.Caching.Helpers.StampedeTesterRig.TUnit.Caching.Helpers.BackplaneCaptureRig.TUnit.Caching.Helpers.ClockControlEach provider isolates differently — memory caches per-fixture, Redis
via key prefix, hybrid via L1 reset + L2 prefix. The base contract's
CacheAssert assumes isolation is guaranteed by the provider.
slowest (backplane + L1 + L2 coordination).
StampedeTester reports > 1 loader call — the provider's stampede
prevention window is narrower than the test's concurrent-call window.See .
CacheAssert.Stampede(…) tests per-key coalescing.*CacheBenchmarks.cs entries under tests/Rig.TUnit.Benchmarks/.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Rig.TUnit.Caching:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
|
|
Rig.TUnit.Caching.Fusion
TUnit fixture for ZiggyCreatures FusionCache. Layered cache, fail-safe, and adaptive caching test helpers. |
|
|
Rig.TUnit.Caching.Redis
TUnit fixture for Redis-as-cache backed by Testcontainers. Lock acquisition, tag invalidation, and TTL assertions. |
|
|
Rig.TUnit.Caching.Memory
TUnit fixture for IMemoryCache - in-process, no container required. Suitable for unit-style cache tests. |
|
|
Rig.TUnit.Caching.Hybrid
TUnit fixture for ASP.NET Core HybridCache (L1+L2). Layered cache assertions and stampede-prevention checks. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 73 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 68 | 4/26/2026 |