0

As we can use cloudfront for http cache / shared cache / as cdn. cloudfront can cache based on Cache-Control headers received from origin (response headers) But when I pass Cache-Control : no-cache as request header, I am still getting response from cloudfront where as, for HTTP cache it should hit the origin to get the response. I have set the minimum TTL setting to 0. Is there any way we can handle this behaviour with cloudfront ?

2
  • You probably want no-store here, but when you say pass do you mean sending it in the request? That cache-control header should be set in the response in your origin, not by the requester. Commented Jul 21, 2022 at 18:23
  • Yes I am passing as request header to cloudfront url not as response header. With response header from origin it's working. I want to know if cloufront support Cache-Control headers passed from request headers. Earlier we were using varnish as HTTP cache where we can get the data from origin and not from cache when we pass Cache-Control : no-cache in request header Commented Jul 22, 2022 at 4:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.