Development with AWS Services

An application caches DynamoDB Query results in DAX with a five-minute query cache TTL. After updating a matching item through DAX, the application repeats the same eventually consistent Query and sees the old value; which change best ensures fresh results for this query?

Show the answer

Correct answerB. Issue a strongly consistent Query to the table.

AWhy not this: Direct DynamoDB writes do not invalidate DAX query cache entries and can also leave item cache entries stale.

BWhy this is right: A strongly consistent table Query reads current committed data rather than serving the cached result set.

CWhy not this: The item cache TTL does not control cached Query result sets.

DWhy not this: Another DAX node does not provide a freshness guarantee for an eventually consistent cached Query.

A strongly consistent Query against the table avoids the stale DAX query cache. Writes through DAX update its item cache but do not invalidate cached Query result sets.