Reputation: 429
How do I disable query cache for AWS Dynamo DAX? The answer at Can we have infinite TTL for DAX item cache mentions setting the ttl to 0 would just make the query results to live ever till eviction.
Upvotes: 0
Views: 1664
Reputation: 1572
If you need specific queries to be strongly consistent, DAX will honor that parameter if you pass it in the API call.
To perform a strongly consistent GetItem, BatchGetItem, Query, or Scan request, you set the ConsistentRead parameter to true. DAX passes strongly consistent read requests to DynamoDB.
The other possibility is to use 2 clients. The DAX one for queries that you want cached and the dynamodb one for queries that you need to bypass the cache. Since DAX implements the sam API as dynamodb, it shouldn’t be too hard to implement.
Upvotes: 2