Zongsoft.Externals.Garnet 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Zongsoft.Externals.Garnet --version 1.2.0
                    
NuGet\Install-Package Zongsoft.Externals.Garnet -Version 1.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="Zongsoft.Externals.Garnet" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zongsoft.Externals.Garnet" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Zongsoft.Externals.Garnet" />
                    
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 Zongsoft.Externals.Garnet --version 1.2.0
                    
#r "nuget: Zongsoft.Externals.Garnet, 1.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 Zongsoft.Externals.Garnet@1.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=Zongsoft.Externals.Garnet&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Zongsoft.Externals.Garnet&version=1.2.0
                    
Install as a Cake Tool

Zongsoft.Externals.Garnet Extension Plugin Library

License NuGet Version NuGet Downloads GitHub Stars

English | 简体中文


Overview

Zongsoft.Externals.Garnet hosts Microsoft Garnet as a Zongsoft WorkerBase. Garnet is a high-performance, Redis-protocol-compatible data store; this adapter owns server start/stop and translates framework settings into Garnet command-line options.

Installation and Configuration

dotnet add package Zongsoft.Externals.Garnet

Deploy the plugin and option artifacts. A named server is configured below /Externals/Garnet:

<option path="/Externals/Garnet">
	<server server.name="cache"
	        value="bind=127.0.0.1;port=6379;auth=Password;password=REPLACE_ME;lua=true" />
</option>

Start a GarnetServer("cache") through the application worker lifecycle. Its Setting property can select a setting independently of the worker name. Relative path-valued options resolve from the adapter assembly directory; ~/ resolves from the application root.

Lifecycle and Persistence

Starting creates the underlying Garnet.GarnetServer and calls Start; stopping disposes it. The adapter maps friendly names such as Address, EnableAOF, CheckpointDir, and EnableTLS to Garnet options while passing native option names through.

💡 Redis protocol compatibility does not imply that every Redis command, module, persistence mode, or client behavior is identical. Validate the exact commands used by the consuming application.

🚨 The packaged example password is a placeholder. Bind to trusted interfaces, set authentication and TLS deliberately, protect checkpoint/AOF directories, restrict module loading, and test recovery before storing durable data. An in-process server shares failure and resource boundaries with its host.

Verification

Use a disposable directory and port, start the worker, connect with a compatible client, exercise required commands, stop it, and—when persistence is enabled—restart and verify recovery. Test memory limits, connection limits, shutdown time, and corrupted-checkpoint handling before production.

Plugin-Based Integration

Compose this feature through the host; a package reference supplies compile-time APIs, while plugin loading also requires deployed manifests and runtime assets. See the complete plugin workflow.

This plugin mounts a startup worker. Configure /Externals/Garnet before starting the host: loading the worker can start an embedded server and open a listening port.

Runtime artifact Source of truth
Zongsoft.Externals.Garnet Zongsoft.Externals.Garnet.plugin
File copying and dependencies Zongsoft.Externals.Garnet.deploy

Add this fragment to an existing host .deploy (retain Main and the host’s other base manifests; do not replace the whole file):

[plugins zongsoft externals garnet]
nuget:Zongsoft.Externals.Garnet

Run dotnet deploy against a test deployment as explained in the workflow, with the host's framework, platform, architecture and, where needed, site. Pin compatible versions in real deployments; application dependencies such as databases, caches or commercial runtimes are still separate prerequisites.

Additional artifacts listed by the deployment manifest include Zongsoft.Externals.Garnet.plugin, Zongsoft.Externals.Garnet.option. Retain assemblies, dependencies and satellite resource directories as well. Restart the host after deployment, check plugin loading and service/driver registration, then verify the workflow above; copied files alone do not prove that the feature is active.

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 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. 
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
2.1.0 101 11/30/2026
2.0.0 109 11/15/2026
1.5.0 119 10/20/2026
1.4.0 107 10/17/2026
1.3.0 106 10/16/2026
1.2.0 102 10/10/2026
1.1.0 138 5/12/2026