8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

S3 に CloudFront を適用するときの注意点

8
Last updated at Posted at 2014-09-10

CloudFront では Minimum TTL という設定項目でキャッシュ時間を指定できますが、S3 に CloudFront を適用する場合、何もしなければ Minimum TTL は有効に働かず、キャッシュ時間はデフォルトの「24時間」になってしまうことがあります。

CloudFrontのキャッシュ時間(TTL)はどの程度なのか

こちらの表にまとまっているように、キャッシュ時間はオリジンサーバーのヘッダの返却値と Minimum TTL との掛け合わせによって算出されます。
S3 ではデフォルトではこれらのヘッダは設定されないため、メタデータに「Cache-Control: max-age=0」を設定する必要があります。

CloudFront の Minimum TTL は必ず有効に働くわけではないことに注意しましょう。

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?