> For the complete documentation index, see [llms.txt](https://docs.zongsoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zongsoft.com/documentation/en/framework/externals/projects/garnet.md).

# Garnet (garnet)

The Garnet project's capability scope, deployment products, integration portals and usage boundaries.

Run a Garnet server that supports the Redis protocol through a host [worker](https://github.com/Zongsoft/framework/blob/main/Zongsoft.Core/src/Components/IWorker.cs). The project assumes server hosting responsibilities, and business clients still need corresponding access adapters.

| Item                  | value                                                                                    |
| --------------------- | ---------------------------------------------------------------------------------------- |
| source code directory | `externals/garnet`                                                                       |
| main bag              | `Zongsoft.Externals.Garnet`                                                              |
| Companion theme       | [Caching and Distributed Coordination](/documentation/en/framework/externals/caching.md) |

## Deployment and Usage Portal

Append the main package to the existing host's [Deployment checklist](/documentation/en/references/deploy-files.md), and retain the plugin list, assembly and ancillary running resources in the package:

{% code title="Application.deploy (append fragment)" %}

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

{% endcode %}

The setting is at `/Externals/Garnet`, and the value of the named server is converted to a server option. Starting the [worker](https://github.com/Zongsoft/framework/blob/main/Zongsoft.Core/src/Components/IWorker.cs) will use the corresponding port and storage directory.

## Integration Steps

1. Enable [worker](https://github.com/Zongsoft/framework/blob/main/Zongsoft.Core/src/Components/IWorker.cs) after explicitly binding address, port, authentication and persistence directory.
2. Use the selected client to verify the commands and data types your app actually relies on.
3. If AOF or checkpointing is enabled, verify stops, restarts, and data recovery.

For specific configuration, calling examples and related basic concepts, see [Caching and Distributed Coordination](/documentation/en/framework/externals/caching.md).

## Project Boundaries

{% hint style="info" %}
💡 The server and host share process resources and fault boundaries. Relative directories are usually resolved relative to the adapter assembly, and `~/` is relative to the application root directory; Redis protocol compatibility does not mean that all commands and persistence behaviors are the same.
{% endhint %}

## Further Reading

[Browse extensions by project](/documentation/en/framework/externals/projects.md) · [Caching and Distributed Coordination](/documentation/en/framework/externals/caching.md) · [source code and project description](https://github.com/Zongsoft/framework/tree/main/externals/garnet)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zongsoft.com/documentation/en/framework/externals/projects/garnet.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
