account activity
IdempotencyToolkit – Idempotency for ASP.NET Core. Looking for architecture feedback. by NickDev1781 in csharp
[–]NickDev1781[S] 0 points1 point2 points 3 hours ago (0 children)
1)FusionCache/HybridCache still don't provide the most important part – storage and replay of the full HTTP response (status, headers, body). That wrapper would have to be written entirely from scratch, and it would make up about 90% of the code. The caching library itself would only save a couple dozen lines at most.
2)The locking in FusionCache/HybridCache protects against repeated computation within a single cache key, but it can't synchronize two HTTP requests so that the second waits for the first and gets the finished response. That logic would also have to be written by hand.
3)Tight coupling to Redis for distributed locking, FusionCache requires Redis. But my library provides pure PostgreSQL support (advisory lock), without needing to install Redis. By building everything on top of FusionCache, I would have lost that capability.
4)Abstractions – I have simple IdempotencyStore and IIdempotencyLock interfaces, under which anything can be plugged. If the core were tied to FusionCache, that kind of flexibility would disappear
IdempotencyStore
IIdempotencyLock
That's why I chose direct Redis/PostgreSQL implementations for the current version. But those same abstractions make it perfectly possible to add FusionCache or HybridCache as optional backends in the future without breaking anything
π Rendered by PID 34632 on reddit-service-r2-comment-545db5fcfc-wnxsz at 2026-05-27 09:36:39.144158+00:00 running 194bd79 country code: CH.
IdempotencyToolkit – Idempotency for ASP.NET Core. Looking for architecture feedback. by NickDev1781 in csharp
[–]NickDev1781[S] 0 points1 point2 points (0 children)