Reputation: 811
I just wonder whether Cloudfront will cache 404 status code if my server return cache-control header with "no-cache, must-revalidate, max-age=0"? I check this document https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HTTPStatusCodes.html#HTTPStatusCodes-cached-errors, but it only said Cloudfront will cache when "Your origin returns an HTTP 4xx status code that is not restricted by a cache control header", which implies that they will not cache if cache control header is set.
Upvotes: 1
Views: 1428
Reputation: 2589
Contrary to the comments, the documentation clearly states that 404 is in fact always cached.
Upvotes: 1