![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Caching.Memory --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Caching.Memory -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Caching.Memory" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Caching.Memory" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Caching.Memory" />Project file
paket add Rig.TUnit.Caching.Memory --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Caching.Memory, 0.1.0-beta.2"
#:package Rig.TUnit.Caching.Memory@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Caching.Memory&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Caching.Memory&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
IMemoryCache-backedCacheFixtureBase— single-node in-memory cache. Zero-container speed-of-light tier.
The simplest cache provider: a standard Microsoft.Extensions.Caching. Memory.IMemoryCache wrapped in a Rig.TUnit fixture. No container, no
distributed coordination, no backplane — just a dictionary with TTL +
size-limit eviction and the CacheRigContract subset that applies to
single-node caches.
CacheRigContract in its fastest mode.Rig.TUnit.Caching.Fusion with an L2 Redis backplane.Microsoft.Extensions.Caching.Memory (transitive)using Rig.TUnit.Caching.Memory.Fixtures;
await using var fx = new MemoryCacheFixture();
await fx.InitializeAsync();
fx.Cache.Set("k", "v", TimeSpan.FromSeconds(30));
| Property | Type | Default | Description |
|---|---|---|---|
SizeLimit |
long? |
null |
IMemoryCache.SizeLimit |
CompactionPercentage |
double |
0.25 |
% evicted on size-pressure |
DefaultTtl |
TimeSpan |
5m |
Applied when entry has no explicit TTL |
Rig.TUnit.Caching.Memory.Fixtures.MemoryCacheFixtureRig.TUnit.Caching.Memory.Options.MemoryCacheFixtureOptionsRig.TUnit.Caching.Memory.Builder.MemoryCacheRigBuilderPer-fixture IMemoryCache instance. Each test owns its own cache;
nothing is shared. Safe under full parallelism without any extra work.
Set/Get: ~200 ns.CacheAssert.Coherent(…) is a no-op
against a single-node cache. The contract suite's skipped entries are
documented; do not treat the skip as a regression.SizeLimit must be combined with
per-entry Size; entries without a Size are never size-evicted.See .
IMemoryCache.Remove(object) takes object, not string — typed
wrappers are your friend.AbsoluteExpirationRelativeToNow on Set measures from enqueue
time, not eviction-check time. A 5 s expiry set at T=0 evicts at T=5.See ;
baseline in benchmarks/baseline-005.json. Speed-of-light reference.
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 1 NuGet packages that depend on Rig.TUnit.Caching.Memory:
| 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). |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 67 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 60 | 4/26/2026 |