4 ms·
Futures/promises means nothing to me. But I always thought an idempotency key was just sending in a time stamp or something else unique.
by pbreit 9y ago
Futures/promises means nothing to me.
But I always thought an idempotency key was just sending in a time stamp or something else unique.
- naasking 9y agoTime stamps are not unique, you definitely need something unique, like a GUID to distinguish it from such tokens bound to other client requests. And you'd be better served learning about the more general abstraction rather than learning a single domain-specific trick. This solution is obvious once you know about promises.