Keryhe.Almandine.Abstractions
1.0.0-preview.1
dotnet add package Keryhe.Almandine.Abstractions --version 1.0.0-preview.1
NuGet\Install-Package Keryhe.Almandine.Abstractions -Version 1.0.0-preview.1
<PackageReference Include="Keryhe.Almandine.Abstractions" Version="1.0.0-preview.1" />
<PackageVersion Include="Keryhe.Almandine.Abstractions" Version="1.0.0-preview.1" />
<PackageReference Include="Keryhe.Almandine.Abstractions" />
paket add Keryhe.Almandine.Abstractions --version 1.0.0-preview.1
#r "nuget: Keryhe.Almandine.Abstractions, 1.0.0-preview.1"
#:package Keryhe.Almandine.Abstractions@1.0.0-preview.1
#addin nuget:?package=Keryhe.Almandine.Abstractions&version=1.0.0-preview.1&prerelease
#tool nuget:?package=Keryhe.Almandine.Abstractions&version=1.0.0-preview.1&prerelease
Keryhe.Almandine.Abstractions
Contracts for the Almandine cache tier. Implement these to plug your entity persistence logic into Almandine — no dependency on Almandine's Garnet/RabbitMQ hosting stack.
Install
dotnet add package Keryhe.Almandine.Abstractions
ITypeHandler / TypeHandlerBase<T>
A handler owns persistence for one entity type, addressed by a key prefix (e.g. "customer:").
Derive from TypeHandlerBase<T> and implement the SQL-facing methods; JSON
serialization is handled for you.
public class CustomerHandler : TypeHandlerBase<Customer>
{
protected override Task PersistModelAsync(string id, Customer model) { ... }
protected override Task<Customer?> LoadModelAsync(string id) { ... }
public override Task DeleteAsync(string id) { ... }
public override IAsyncEnumerable<(string CacheKey, string Json)> LoadAllAsync(
CancellationToken ct = default) { ... }
}
PersistAsync, DeleteAsync, PersistManyAsync, and DeleteManyAsync must be
idempotent — the write-behind queue may replay an operation more than once after a
transient failure or a dead-letter redelivery. DeleteAsync on a non-existent record
must not throw.
Override PersistManyAsync/DeleteManyAsync with a real bulk operation when you need
better throughput than the default sequential-call implementation.
IDatabaseService
The interface Almandine's core hosting library (Keryhe.Almandine.Core) talks to for
cache-miss fallback and write-behind persistence. You normally don't implement this
directly — register HandlerDatabaseService (from Keryhe.Almandine.Core) backed by a
TypeHandlerRegistry of your ITypeHandler implementations instead.
| 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
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Keryhe.Almandine.Abstractions:
| Package | Downloads |
|---|---|
|
Keryhe.Almandine.Core
Core hosting library for the Keryhe.Almandine write-behind cache tier |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.1 | 97 | 8/30/2026 |