Design Patterns · Junior · Question 71 of 75
What does it mean that an operation is idempotent?
- ✓Correct answer: Repeating it gives the same result as doing it once (e.g. setting a value, deleting by id)
- 2It runs only once
- 3It has no side effects at all
Explanation
Idempotent operations are safe to retry after timeouts. "Add 1" isn't idempotent; "set to 5" is.