LoginSignup
0
0

More than 5 years have passed since last update.

php で Cloud Front にキャッシュしてもらうようにする

Posted at
header_remove('Expires');
header_remove('Pragma');
header("Cache-Control: max-age=240, must-revalidate");

CloudFront エッジキャッシュにオブジェクトを保持する時間の指定(有効期限切れ)

ビューアからの GET リクエストで HTTP Cache-Control または Pragma ヘッダーフィールドを使用して、オリジンサーバーに戻ってオブジェクトを取得するように CloudFront を設定することはできません。CloudFront は、ビューアからのリクエストにあるそのようなヘッダーフィールドを無視します。

とあったが、Pragma を消さないと X-Cache: Miss from cloudfront だった。

0
0
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
0
0