Skip to content

Commit

Permalink
docs(idempotency): cleanup default behavior section
Browse files Browse the repository at this point in the history
Signed-off-by: heitorlessa <[email protected]>
  • Loading branch information
heitorlessa committed Jun 6, 2024
1 parent 285e7ff commit 8ae6570
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/utilities/idempotency.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,15 +728,15 @@ graph TD;

### Customizing the default behavior

Idempotent decorator can be further configured with **`IdempotencyConfig`** as seen in the previous example. These are the available options for further configuration
You can override and further extend idempotency behavior via **`IdempotencyConfig`** with the following options:

| Parameter | Default | Description |
| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **event_key_jmespath** | `""` | JMESPath expression to extract the idempotency key from the event record using [built-in functions](./jmespath_functions.md#built-in-jmespath-functions){target="_blank"} |
| **payload_validation_jmespath** | `""` | JMESPath expression to validate whether certain parameters have changed in the event while the event payload |
| **payload_validation_jmespath** | `""` | JMESPath expression to validate whether certain parameters have changed in the event while the event payload _e.g., payload tampering._ |
| **raise_on_no_idempotency_key** | `False` | Raise exception if no idempotency key was found in the request |
| **expires_after_seconds** | 3600 | The number of seconds to wait before a record is expired |
| **use_local_cache** | `False` | Whether to locally cache idempotency results |
| **expires_after_seconds** | 3600 | The number of seconds to wait before a record is expired, allowing a new transaction with the same idempotency key |
| **use_local_cache** | `False` | Whether to cache idempotency results in-memory to save on persistence storage latency and costs |
| **local_cache_max_items** | 256 | Max number of items to store in local cache |
| **hash_function** | `md5` | Function to use for calculating hashes, as provided by [hashlib](https://docs.python.org/3/library/hashlib.html){target="_blank" rel="nofollow"} in the standard library. |
| **response_hook** | `None` | Function to use for processing the stored Idempotent response. This function hook is called when an existing idempotent response is found. See [Manipulating The Idempotent Response](idempotency.md#manipulating-the-idempotent-response) |
Expand Down

0 comments on commit 8ae6570

Please sign in to comment.