Why are two requests with different clients from the same computer cache misses on cloudfront?

旧城冷巷雨未停 提交于 2019-12-07 08:35:27

The reason you are seeing this behavior is because your requests are different. To give you some background, Cloudfront cache varys based on the http accept-encoding header. In your first example, in your browser, you are sending the value of gzip. With your curl example, by default, you are not. Therefore Cloudfront see's this objects as being unique.

Try passing the --compressed flag in curl and see if the behavior matches your browser.

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#CompressedCustomOrigin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!