Keryhe.Almandine.Core
1.0.0-preview.1
dotnet add package Keryhe.Almandine.Core --version 1.0.0-preview.1
NuGet\Install-Package Keryhe.Almandine.Core -Version 1.0.0-preview.1
<PackageReference Include="Keryhe.Almandine.Core" Version="1.0.0-preview.1" />
<PackageVersion Include="Keryhe.Almandine.Core" Version="1.0.0-preview.1" />
<PackageReference Include="Keryhe.Almandine.Core" />
paket add Keryhe.Almandine.Core --version 1.0.0-preview.1
#r "nuget: Keryhe.Almandine.Core, 1.0.0-preview.1"
#:package Keryhe.Almandine.Core@1.0.0-preview.1
#addin nuget:?package=Keryhe.Almandine.Core&version=1.0.0-preview.1&prerelease
#tool nuget:?package=Keryhe.Almandine.Core&version=1.0.0-preview.1&prerelease
Keryhe.Almandine.Core
Core hosting library for the Almandine write-behind cache tier. Hosts a
Garnet server with custom Redis-compatible
commands (DB_GET/DB_SET/DB_DEL + batch variants) implementing cache-aside reads
and asynchronous write-behind persistence, backed by a RabbitMQ queue, a Polly circuit
breaker, and OpenTelemetry instrumentation.
Install
dotnet add package Keryhe.Almandine.Core
You'll also want Keryhe.Almandine.Abstractions to implement your entity handlers.
Setup
Register a concrete IDatabaseService before calling AddAlmandine() — typically
HandlerDatabaseService backed by a TypeHandlerRegistry of your ITypeHandler
implementations:
builder.Services.AddSingleton<TypeHandlerRegistry>(sp =>
{
var registry = new TypeHandlerRegistry(sp.GetRequiredService<ILoggerFactory>()
.CreateLogger<TypeHandlerRegistry>());
registry.Register("customer:", new CustomerHandler(connectionString));
registry.Register("order:", new OrderHandler(connectionString));
return registry;
});
builder.Services.AddSingleton<IDatabaseService, HandlerDatabaseService>();
builder.AddAlmandine(args);
builder.AddAlmandineOpenTelemetry(); // must come after AddAlmandine()
await builder.Build().RunAsync();
AddAlmandine() registers the Redis connection, options, RabbitMQ topology, circuit
breaker, write-behind queue, and hosted services (Garnet server, queue consumer, DB
health poller, metrics). It's safe to call more than once — later calls are no-ops.
Configuration
Bound from configuration sections of the same name:
| Section | Options |
|---|---|
Redis:ConnectionString |
Garnet/Redis connection string (default 127.0.0.1:6379,abortConnect=false) |
RabbitMq |
Broker connection + exchange/queue names (RabbitMqOptions) |
RabbitMqQueue |
Replay rate, max replay attempts, drain batch size (RabbitMqQueueOptions) |
RetryOptions |
Write-behind retry policy (RetryOptions) |
CircuitBreaker |
Break duration, sampling window, health-check interval (CircuitBreakerOptions) |
Otlp |
OTLP export endpoint/headers, console exporter toggle (OtlpOptions) |
The Garnet server itself reads garnet.conf (memory limit, AOF, port) from the working
directory — copy it to your host project's output directory.
| Product | Versions 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. |
-
net10.0
- Keryhe.Almandine.Abstractions (>= 1.0.0-preview.1)
- Keryhe.Messaging (>= 3.1.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Microsoft.Garnet (>= 1.1.10)
- OpenTelemetry.Exporter.Console (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- OpenTelemetry.Extensions.Hosting (>= 1.16.0)
- OpenTelemetry.Instrumentation.StackExchangeRedis (>= 1.12.0-beta.1)
- Polly (>= 8.7.0)
- RabbitMQ.Client (>= 7.2.1)
- StackExchange.Redis (>= 2.11.3)
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 |
|---|---|---|
| 1.0.0-preview.1 | 88 | 8/30/2026 |