Refactored IdempotentProvider for clarity.