squirix.extensions.caching 0.2.0-preview.1

This is a prerelease version of squirix.extensions.caching.
dotnet add package squirix.extensions.caching --version 0.2.0-preview.1
                    
NuGet\Install-Package squirix.extensions.caching -Version 0.2.0-preview.1
                    
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="squirix.extensions.caching" Version="0.2.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="squirix.extensions.caching" Version="0.2.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="squirix.extensions.caching" />
                    
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 squirix.extensions.caching --version 0.2.0-preview.1
                    
#r "nuget: squirix.extensions.caching, 0.2.0-preview.1"
                    
#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 squirix.extensions.caching@0.2.0-preview.1
                    
#: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=squirix.extensions.caching&version=0.2.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=squirix.extensions.caching&version=0.2.0-preview.1&prerelease
                    
Install as a Cake Tool

Squirix distributed cache provider

Use squirix.extensions.caching to store IDistributedCache values on a Squirix server. Use the same preview release of the adapter, client and server.

Early preview. Evaluate it before production use.

using Microsoft.Extensions.DependencyInjection;

builder.Services.AddSquirixCache(options =>
    options.ClientOptions.Endpoints.Add(new Uri("https://cache.example.com:7443")));

To use Squirix as the secondary cache for Microsoft HybridCache, register the provider as above and call builder.Services.AddHybridCache() from the separate Microsoft.Extensions.Caching.Hybrid package. HybridCache manages its local cache in the application. Squirix stores the secondary values on the server.

using Microsoft.Extensions.Caching.Hybrid;

builder.Services.AddHybridCache();

var app = builder.Build();
app.MapGet("/cached-message", async (HybridCache cache, CancellationToken token) =>
    await cache.GetOrCreateAsync(
        "demo:message",
        static _ => ValueTask.FromResult("Hello from HybridCache"),
        cancellationToken: token));
app.Run();

Registration replaces other unkeyed IDistributedCache providers. Repeated calls compose configuration in order and keep one singleton. The provider connects lazily, reuses its client, and is disposed with the service provider. Configure a bearer token delegate through ClientOptions.BearerTokenProvider when required.

Get returns null for a missing entry. An empty stored value returns an empty array. Set replaces the value and its expiration policy together. When both absolute options are set, the earlier deadline wins. Get and Refresh renew sliding entries up to any absolute cap. Remove deletes the entry and its policy.

Each network attempt of Get reads the current entry and renews that entry atomically. A retry can return newer bytes or a miss. Read responses and removed values are not retained as mutation outcomes. Sliding renewals still journal and replicate the updated entry.

Upgrade the adapter, client and all server nodes together. Stop the old nodes and use empty server data directories for this preview format; older directories and replication snapshots are rejected. Keep the old data and binaries together for rollback.

The provider stores the bytes supplied by the caller or HybridCache. Native Squirix serializers and JSON contexts are unused. Avoid sharing the configured cache namespace with a native application that writes its own values.

The asynchronous methods accept caller cancellation. Cancellation can end the wait for a remote mutation after the server has already accepted it. The synchronous methods block until their corresponding operation completes. An asynchronous bearer token provider should honor cancellation. Disposal cancels pending work and waits up to 30 seconds for the owned client to shut down.

Product Compatible and additional computed target framework versions.
.NET 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.  net11.0 is compatible. 
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-preview.1 37 11/23/2026

Squirix 0.2.0-preview.1 uses the native server and updates the client packages. See https://github.com/squirix/squirix/blob/main/docs/release-notes/v0.2.0-preview.1.md