![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Caching.Redis --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Caching.Redis -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Caching.Redis" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Caching.Redis" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Caching.Redis" />Project file
paket add Rig.TUnit.Caching.Redis --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Caching.Redis, 0.1.0-beta.2"
#:package Rig.TUnit.Caching.Redis@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Caching.Redis&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Caching.Redis&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Redis-as-cache fixture (primary home for
RedisFixture) withRedisBackplaneCapturefor pub/sub cache-invalidation tests.
The Rig.TUnit Redis-as-cache provider. Primary home for RedisFixture —
the same container is re-used by Rig.TUnit.Databases.NoSql.Redis in
its KV role. Exposes UseRedisCache(…) (no bare UseRedis — ADR-007
forces the caller to declare intent cache vs KV). Ships
RedisBackplaneCapture which subscribes to a pub/sub channel and
records cache-invalidation events, so tests can assert
"publishing orders:cache-invalidate evicts the L1 on every node".
Rig.TUnit.Databases.NoSql.Redis.StackExchange.Redis (transitive)using Rig.TUnit.Caching.Redis.Fixtures;
using StackExchange.Redis;
await using var fx = new RedisFixture();
await fx.InitializeAsync();
var db = ConnectionMultiplexer.Connect(fx.ConnectionString).GetDatabase();
await db.StringSetAsync("cache:orders:42", "{}", TimeSpan.FromMinutes(5));
| Property | Type | Default | Description |
|---|---|---|---|
Image |
string |
"redis:7-alpine" |
Image |
StartupTimeoutSeconds |
int |
30 |
Redis boots fast |
Password |
string? |
null |
Off in dev mode |
BackplaneChannel |
string |
"cache-invalidate" |
Pub/sub channel |
Rig.TUnit.Caching.Redis.Fixtures.RedisFixtureRig.TUnit.Caching.Redis.Options.RedisCacheFixtureOptionsRig.TUnit.Caching.Redis.Builder.RedisCacheRigBuilderRig.TUnit.Caching.Redis.Helpers.RedisBackplaneCapturePer-test key prefix cache:{IsolationKey:short}:*. Teardown via
SCAN + DEL on the prefix. Pub/sub channels are per-fixture to avoid
cross-test subscriber leakage.
TimeoutException on first op — ConnectionMultiplexer.Connect
is synchronous and blocks until the initial topology discovery
completes; under heavy parallel startup this can exceed the default
5-second timeout. Raise SyncTimeout in your config.ISubscriber.Subscribe is
eventually-consistent; poll for the subscription to be active before
publishing (fixture does this but a custom wire-up must too).See .
KEYS * is the classic production foot-gun; the fixture-internal
teardown uses SCAN (O(1) per batch) instead.UseRedis does not exist;
this is deliberate.See ;
baseline in benchmarks/baseline-005.json.
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 2 NuGet packages that depend on Rig.TUnit.Caching.Redis:
| 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.Databases.NoSql.Redis
TUnit fixture for Redis-as-database backed by Testcontainers. Use for Redis-as-database scenarios; for caching see Rig.TUnit.Caching.Redis. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 69 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 60 | 4/26/2026 |