Cloudfront cache mutation:

0

Can anyone tell me the best practice of caching in cloudfront? Why mutation in the dynamodb table isn't reflecting? I have set the cache behaviour to max TTL:3sec, min TTL:0sec. When I'm refreshing the cloudfront url after 3 sec it is showing the mutation. But in the second refresh after 3 sec it is showing the older result.

1 Answer
0
Accepted Answer

Are you doing strongly-consistent reads rather than eventually-consistent reads in DynamoDB? If not, then after a mutation a sequence of reads may return a mix of old and new values until full consistency is achieved.

EXPERT
answered 2 years ago
  • I want something like when any mutation occurs it should pass through cloudfront to dynamoDB. When a mutation will occur cloudfront will match the ID of objects in cache, if id matches it will be updated in CloudFront and then in DynamoDB.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions