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 réponse
0
Réponse acceptée

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
répondu il y a 2 ans
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions