summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-04-19 21:34:49 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-04-20 13:37:44 -0500
commita2a65250d61997935763cf958f16a914930f1b43 (patch)
tree4b2c37d54ea29a33dedbc0e61c610b1013b7231c /docs
parent3fb12461d847e04884f66dcf64ff5cabc79cce91 (diff)
downloadrequests-cache-a2a65250d61997935763cf958f16a914930f1b43.tar.gz
Add support for DynamoDB TTL
Diffstat (limited to 'docs')
-rw-r--r--docs/user_guide/backends/dynamodb.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/user_guide/backends/dynamodb.md b/docs/user_guide/backends/dynamodb.md
index f807a77..247b044 100644
--- a/docs/user_guide/backends/dynamodb.md
+++ b/docs/user_guide/backends/dynamodb.md
@@ -60,9 +60,24 @@ Here are the details you will need:
```
:::
-Then deploy with:
+To deploy with the [AWS CLI](https://aws.amazon.com/cli):
```
aws cloudformation deploy \
--stack-name requests-cache \
--template-file examples/cloudformation.yml
```
+
+## Expiration
+DynamoDB natively supports TTL on a per-item basis, and can automatically remove expired responses from
+the cache. This will be set by by default, according to normal {ref}`expiration settings <expiration>`.
+
+```{warning}
+DynamoDB does not remove expired items immediately. See
+[How It Works: DynamoDB Time to Live](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html)
+for more details.
+```
+
+If needed, you can disable this behavior with the `ttl` argument:
+```python
+>>> backend = DynamoDbCache(ttl=False)
+```