How do we invalidate the cache in AWS CloudFront CDN when publishing content?

Environment

AEM 6.0-6.3

Steps

There is nothing out-of-the-box in AEM that does this. However, a custom solution could be developed:

  1. Implement a custom replication agent. See the steps here.
  2. To do the actual cache invalidation in the TransportHandler code, use the CloudFront API POST invalidation as documented here.

Alternatively, instead of creating a flush agent, the best practice is simply to leverage the "Cache-Control: max-age=..."  header to control the TTL of files in the CloudFront CDN.  This works instead of implementing a replication agent to invalidate the CloudFront cache. See this documentation.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책