You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/utilities/parameters.md
+28-3
Original file line number
Diff line number
Diff line change
@@ -88,9 +88,34 @@ The following will retrieve the latest version and store it in the cache.
88
88
89
89
## Advanced
90
90
91
+
### Adjusting cache TTL
92
+
93
+
By default, we cache parameters retrieved in-memory for 5 seconds.
94
+
95
+
You can adjust how long we should keep values in cache by using the param `max_age`, when using `get()` or `get_multiple` methods across all providers.
96
+
97
+
=== "app.py"
98
+
99
+
```python hl_lines="9"
100
+
from aws_lambda_powertools.utilities import parameters
By default, we cache parameters retrieves for 5 seconds. If you'd like to override this behaviour and always fetch the latest parameter from the store, use `force_fetch` param.
118
+
If you'd like to always ensure you fetch the latest parameter from the store regardless if already available in cache, use `force_fetch` param.
94
119
95
120
=== "app.py"
96
121
@@ -133,8 +158,8 @@ The AWS Systems Manager Parameter Store provider supports two additional argumen
133
158
134
159
| Parameter | Default | Description |
135
160
|---------------|---------|-------------|
136
-
|**decrypt**|`False`| Will automatically decrypt the parameter.|
137
-
|**recursive**|`True`| For `get_multiple()` only, will fetch all parameter values recursively based on a path prefix.|
161
+
| **decrypt** | `False` | Will automatically decrypt the parameter.
162
+
| **recursive** | `True` | For `get_multiple()` only, will fetch all parameter values recursively based on a path prefix.
0 commit comments