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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ruvio.Extensions.FusionCache" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ruvio.Extensions.FusionCache" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Ruvio.Extensions.FusionCache" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ruvio.Extensions.FusionCache --version 0.2.0
                    
#r "nuget: Ruvio.Extensions.FusionCache, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ruvio.Extensions.FusionCache@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ruvio.Extensions.FusionCache&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Ruvio.Extensions.FusionCache&version=0.2.0
                    
Install as a Cake Tool

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. Classic PUBLISH stays inside one Ruvio process, which is why it is not used.
  • A message is FusionCache's own BackplaneMessage bytes, base64 encoded (about a third larger; the messages are small).
  • The channel is ChannelPrefix (default ruvio: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.Reconnect is on, but FusionCache is not told (IsReconnection is 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) and Ruvio.Client 0.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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