Configuring DynamoDB caching
You configure DynamoDB caching when you install the Amazon ElastiCache integration client in your application. The client install operation takes connection arguments plus an optional client configuration. Optional cache policy overrides control what the client caches and for how long.
The settings and options below use the Python client names. Names in other languages (for example, Node.js or Java) might differ slightly because of each language's case conventions. For the names and defaults in your language, see the client library READMEs on GitHub (elasticache-integration-client
Client installation arguments
You pass the following arguments to the client's install operation.
| Argument | Required | Default | Description |
|---|---|---|---|
|
Yes |
None |
The DynamoDB client from the AWS SDK. |
|
Yes |
None |
The cache endpoint (host:port). |
|
Yes |
None |
The name of the serverless cache. |
|
No |
System trust store |
The path to a certificate authority (CA) bundle used to verify the cache's TLS certificate. |
|
No |
All defaults |
The client configuration options. |
|
No |
|
The ElastiCache IAM user to authenticate as. |
Client configuration options
Client configuration options are used to control client behavior.
| Option | Default | Description |
|---|---|---|
|
None |
The tables, operations, and entry lifetimes to cache. See the following table. |
|
3600 |
The time the client keeps using a cache policy that the cache has not confirmed, in seconds. |
|
5000 |
The time to wait for the cache to answer a request, in milliseconds. |
|
5000 |
The time to try connecting at startup, and the time a request waits for a lost connection to return, in milliseconds. |
|
No limit |
The time that requests can go to DynamoDB directly while the cache is unreachable, in seconds. A value of 0 means requests never fall back to DynamoDB. |
|
300 |
The time after an IAM token is issued before a replacement is signed in the background, in seconds. Valid values are 1–879. |
Cache policy overrides
Cache policy overrides control what the client caches and for how long.
| Option | Default | Description |
|---|---|---|
|
All operations |
The DynamoDB operations to cache, such as GetItem or Query. Empty or absent means all supported operations. |
|
All tables |
The DynamoDB tables to cache. Empty or absent means all tables. |
|
60 |
How long negative item cache entries (a cached "item does not exist" result) live, in seconds. |
|
300 |
How long item cache entries live, in seconds. |
|
UPDATE_CACHED |
How write requests affect cached entries.
|
|
300 |
How long query cache entries live, in seconds. |
|
300 |
How long scan cache entries live, in seconds. |
|
None |
Cache policy overrides for specific tables. Per-table settings override global cache policy settings. |
For the full configuration reference for your preferred language, see elasticache-integration-client