Ruvio.Extensions.FusionCache
0.2.0
dotnet add package Ruvio.Extensions.FusionCache --version 0.2.0
NuGet\Install-Package Ruvio.Extensions.FusionCache -Version 0.2.0
<PackageReference Include="Ruvio.Extensions.FusionCache" Version="0.2.0" />
<PackageVersion Include="Ruvio.Extensions.FusionCache" Version="0.2.0" />
<PackageReference Include="Ruvio.Extensions.FusionCache" />
paket add Ruvio.Extensions.FusionCache --version 0.2.0
#r "nuget: Ruvio.Extensions.FusionCache, 0.2.0"
#:package Ruvio.Extensions.FusionCache@0.2.0
#addin nuget:?package=Ruvio.Extensions.FusionCache&version=0.2.0
#tool nuget:?package=Ruvio.Extensions.FusionCache&version=0.2.0
Ruvio.Extensions.FusionCache
A FusionCache backplane for Ruvio. FusionCache keeps an in-memory (L1) copy of each entry on every app node. When one node sets, removes or expires an entry, the backplane tells the other nodes to drop their copy, so they read the new value from the shared level instead of serving the old one until it expires.
Ruvio can be both parts of a FusionCache setup: the shared level (L2) through Ruvio.Extensions.Caching, and the backplane through this package. No other server is needed.
builder.Services.AddRuvioClient(o => o.Host = "ruvio.internal"); // Ruvio.Client.AspNetCore
builder.Services.AddRuvioDistributedCache(); // Ruvio.Extensions.Caching
builder.Services.AddFusionCache()
.WithSystemTextJsonSerializer()
.WithRegisteredDistributedCache()
.WithRuvioBackplane();
The package does not create a connection. It uses the registered IRuvioClient, or the keyed one named by RuvioBackplaneOptions.ClientKey, and host start fails when that client is missing.
How it works
- The backplane publishes on a sharded channel (
SPUBLISH/SSUBSCRIBE). A channel belongs to one hash slot, so every app node reaches the same owner, also in a multi-node cluster. ClassicPUBLISHstays inside one Ruvio process, which is why it is not used. - A message is FusionCache's own
BackplaneMessagebytes, base64 encoded (about a third larger; the messages are small). - The channel is
ChannelPrefix(defaultruvio:fusioncache:) plus FusionCache's channel name, which defaults to the cache name. Caches that should hear each other need the same cache name and prefix.
Limits
- Messages are not stored. A node whose connection dropped misses what was published meanwhile; its in-memory copies then live until they expire. Give entries a modest
Duration(and use FusionCache's own auto-recovery where it applies). - This package does not detect a reconnect of the Pub/Sub socket. The client subscribes again by itself when
RuvioClientOptions.Reconnectis on, but FusionCache is not told (IsReconnectionis always false). - After a failover, give the client every node of the group (
Seeds) or the coordinators (SentinelMaster). A client that knows only the old primary cannot reach the new one, and neither can its Pub/Sub subscription. In one local run (a primary killed, the replica promoted by the coordinators) the commands worked again within a second and the subscription about 30 seconds later; messages sent in between were lost. - Needs a Ruvio server with sharded Pub/Sub (
SPUBLISH) andRuvio.Client0.4.0. - Needs FusionCache 2.1.0 or newer.
Tests
RUVIO_TEST_ADDR=127.0.0.1:6379 dotnet test integrations/dotnet/Ruvio.Extensions.FusionCache.Tests
The live tests run two FusionCache nodes (each on its own connection, so they also pass when the two nodes talk to two different Ruvio servers of a cluster) (own connections, shared Ruvio level) and check that a set or remove on one node reaches the other node's in-memory copy, and that a message that is not from FusionCache is ignored.
| 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 was computed. 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. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Ruvio.Client (>= 0.5.0)
- ZiggyCreatures.FusionCache (>= 2.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 |
|---|---|---|
| 0.2.0 | 53 | 11/29/2026 |