Keryhe.Almandine.Abstractions 1.0.0-preview.1

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

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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