Wiaoj.Idempotency.Abstractions
0.2.0-alpha.3
This is a prerelease version of Wiaoj.Idempotency.Abstractions.
dotnet add package Wiaoj.Idempotency.Abstractions --version 0.2.0-alpha.3
NuGet\Install-Package Wiaoj.Idempotency.Abstractions -Version 0.2.0-alpha.3
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="Wiaoj.Idempotency.Abstractions" Version="0.2.0-alpha.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wiaoj.Idempotency.Abstractions" Version="0.2.0-alpha.3" />
<PackageReference Include="Wiaoj.Idempotency.Abstractions" />
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 Wiaoj.Idempotency.Abstractions --version 0.2.0-alpha.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Wiaoj.Idempotency.Abstractions, 0.2.0-alpha.3"
#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 Wiaoj.Idempotency.Abstractions@0.2.0-alpha.3
#: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=Wiaoj.Idempotency.Abstractions&version=0.2.0-alpha.3&prerelease
#tool nuget:?package=Wiaoj.Idempotency.Abstractions&version=0.2.0-alpha.3&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Wiaoj.Idempotency.Abstractions
The contract for recording "this has already been handled", so work that arrives twice runs once.
dotnet add package Wiaoj.Idempotency.Abstractions
What is here
IdempotencyKey— a validated key string, parsable and formattable (ISpanParsable,IUtf8SpanParsable,ISpanFormattable), with a JSON converter.IIdempotencyStore— the store contract:
| Member | Meaning |
|---|---|
TryMarkProcessedAsync(key, window) |
Claim the key: true for the first caller, false for every later one inside the window. The operation everything else is built on. |
ContainsAsync(key) |
Has this key been claimed and not expired? |
MarkProcessedAsync(key, window) |
Record the key unconditionally. |
RemoveAsync(key) |
Release a claim, for rolling back after a failure. |
The contract knows nothing about HTTP, webhooks or messaging: it is membership with a TTL.
Claim before the work, not after. TryMarkProcessedAsync is a check and a reservation in one step; checking with ContainsAsync and then recording leaves a window where two callers both see "not yet".
Implementations
| Package | Store | Use it when |
|---|---|---|
Wiaoj.Idempotency |
In-process dictionary | One process, and a restart losing claims is acceptable |
Wiaoj.Idempotency.Redis |
Redis SET NX PX |
More than one replica, or claims must outlive a restart |
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Wiaoj.Preconditions (>= 0.2.0-alpha.3)
- Wiaoj.Primitives (>= 0.2.0-alpha.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Wiaoj.Idempotency.Abstractions:
| Package | Downloads |
|---|---|
|
Wiaoj.Idempotency.Redis
Package Description |
|
|
Wiaoj.Idempotency
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-alpha.3 | 48 | 9/24/2026 |
| 0.2.0-alpha.2 | 48 | 9/24/2026 |
| 0.2.0-alpha.1 | 51 | 9/24/2026 |
| 0.1.0-alpha.9 | 60 | 9/21/2026 |
| 0.1.0-alpha.8 | 57 | 9/21/2026 |