State Management · Senior · Question 61 of 75
Why send an idempotency key with an optimistic "create order" request that may be retried?
- ✓Correct answer: So the server can recognize retries of the same operation and not create duplicates
- 2To encrypt the request
- 3To make the optimistic update roll back faster
Explanation
Retries after timeouts are common with automatic retry logic. Generating the key on the client also lets the optimistic item and the server item share an id.