CrispyWaffle.Redis
10.5.18
dotnet add package CrispyWaffle.Redis --version 10.5.18
NuGet\Install-Package CrispyWaffle.Redis -Version 10.5.18
<PackageReference Include="CrispyWaffle.Redis" Version="10.5.18" />
<PackageVersion Include="CrispyWaffle.Redis" Version="10.5.18" />
<PackageReference Include="CrispyWaffle.Redis" />
paket add CrispyWaffle.Redis --version 10.5.18
#r "nuget: CrispyWaffle.Redis, 10.5.18"
#:package CrispyWaffle.Redis@10.5.18
#addin nuget:?package=CrispyWaffle.Redis&version=10.5.18
#tool nuget:?package=CrispyWaffle.Redis&version=10.5.18
CrispyWaffle.Redis
Part of Crispy Waffle, a toolkit for .NET projects.
CrispyWaffle.Redis connects CrispyWaffle to Redis. It has four parts:
- A cache repository for
CacheManager. - A log provider that publishes log messages to Redis Pub/Sub channels.
- A telemetry client that stores hits, events and metrics in Redis.
- Helpers for master/replica setups and quick counter operations.
Use it when several processes or machines need a shared cache, when you want log messages streamed to listeners in real time, or when you want lightweight counters stored in Redis.
| Package | CrispyWaffle.Redis |
| Namespace | CrispyWaffle.Redis.Cache, CrispyWaffle.Redis.Log, CrispyWaffle.Redis.Log.PropagationStrategy, CrispyWaffle.Redis.Telemetry, CrispyWaffle.Redis.Utils, CrispyWaffle.Redis.Utils.Communications |
| Install | dotnet add package CrispyWaffle.Redis |
| Depends on | CrispyWaffle, CrispyWaffle.Configuration, StackExchange.Redis, StackExchange.Redis.Extensions.Core |
Supported frameworks
This package targets .NET Standard 2.0, .NET Standard 2.1, .NET 8.0, .NET 9.0 and .NET 10.0.
Getting started
Start Redis locally. The repository's docker-compose.yml runs redis:6.2-alpine on port 6379 with the password myP@ssw0rd.
Then create a serializer, a connection and a connector, and register them:
using System.Text.Json;
using System.Threading;
using CrispyWaffle.Cache;
using CrispyWaffle.Composition;
using CrispyWaffle.Configuration;
using CrispyWaffle.Log;
using CrispyWaffle.Redis.Cache;
using CrispyWaffle.Redis.Log;
using CrispyWaffle.Redis.Log.PropagationStrategy;
using CrispyWaffle.Redis.Telemetry;
using CrispyWaffle.Redis.Utils.Communications;
using CrispyWaffle.Telemetry;
using StackExchange.Redis.Extensions.Core;
public sealed class SystemTextJsonRedisSerializer : ISerializer
{
private readonly JsonSerializerOptions _options = new(JsonSerializerDefaults.Web);
public byte[] Serialize<T>(T item) => JsonSerializer.SerializeToUtf8Bytes(item, _options);
public T Deserialize<T>(byte[] serializedObject) =>
JsonSerializer.Deserialize<T>(serializedObject, _options);
}
public static class RedisBootstrap
{
public static void Configure(CancellationToken shutdownToken)
{
var connection = new Connection
{
Host = "localhost",
Port = 6379,
Credentials = { Password = "myP@ssw0rd" },
};
var connector = new RedisConnector(
connection,
new SystemTextJsonRedisSerializer(),
"my-app"
);
// One connector per process: it owns the connection pool.
ServiceLocator.Register(connector);
// Cache
CacheManager.AddRepository(new RedisCacheRepository(connector));
// Logging
LogConsumer
.AddProvider(
new PubSubRedisLogProvider(connector, new GeneralPropagation(), shutdownToken)
)
.SetLevel(LogLevel.Production);
// Telemetry
TelemetryAnalytics.AddClient(new RedisTelemetryClient(connector, "my-app"));
}
}
After that, await CacheManager.SetAsync("value", "my-key"), LogConsumer.Info("...") and TelemetryAnalytics.TrackHit("home") all reach Redis.
Documentation
The full reference and more examples for this package are on the CrispyWaffle.Redis documentation page.
License
Released under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- CrispyWaffle (>= 10.5.18)
- CrispyWaffle.Configuration (>= 10.5.18)
- StackExchange.Redis (>= 3.3.1)
- StackExchange.Redis.Extensions.Core (>= 9.1.0)
-
.NETStandard 2.1
- CrispyWaffle (>= 10.5.18)
- CrispyWaffle.Configuration (>= 10.5.18)
- StackExchange.Redis (>= 3.3.1)
- StackExchange.Redis.Extensions.Core (>= 9.1.0)
-
net10.0
- CrispyWaffle (>= 10.5.18)
- CrispyWaffle.Configuration (>= 10.5.18)
- StackExchange.Redis (>= 3.3.1)
- StackExchange.Redis.Extensions.Core (>= 9.1.0)
-
net8.0
- CrispyWaffle (>= 10.5.18)
- CrispyWaffle.Configuration (>= 10.5.18)
- StackExchange.Redis (>= 3.3.1)
- StackExchange.Redis.Extensions.Core (>= 9.1.0)
-
net9.0
- CrispyWaffle (>= 10.5.18)
- CrispyWaffle.Configuration (>= 10.5.18)
- StackExchange.Redis (>= 3.3.1)
- StackExchange.Redis.Extensions.Core (>= 9.1.0)
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 |
|---|---|---|
| 10.5.18 | 88 | 11/27/2026 |
| 10.5.17 | 96 | 11/27/2026 |
| 10.5.16 | 93 | 11/22/2026 |
| 10.5.15 | 94 | 11/22/2026 |
| 10.5.14 | 97 | 11/22/2026 |
| 10.5.13 | 92 | 11/21/2026 |
| 10.5.12 | 102 | 11/17/2026 |
| 10.5.11 | 96 | 11/17/2026 |
| 10.5.10 | 102 | 11/17/2026 |
| 10.5.9 | 95 | 11/17/2026 |
| 10.5.8 | 103 | 11/15/2026 |
| 10.5.7 | 103 | 11/15/2026 |
| 10.5.6 | 99 | 11/15/2026 |
| 10.5.5 | 98 | 11/15/2026 |
| 10.5.4 | 95 | 11/15/2026 |
| 10.5.3 | 98 | 11/15/2026 |
| 10.5.2 | 98 | 11/15/2026 |
| 10.5.1 | 99 | 11/15/2026 |
| 10.5.0 | 104 | 11/15/2026 |
| 10.4.20 | 101 | 11/13/2026 |
Redis release