-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cacheControl: 'no-cache' Not Working in downloadData (AWS Amplify Gen 2) #14249
Comments
Hey,👋 thanks for raising this! I'm going to transfer this over to our JS repo for better assistance. |
Hey @EmilioSantos-gif can you provide us code snippet to reproduce the issue? Meanwhile, we have realized a part of our documentation is outdated as the option has been removed when v6 was introduced. |
I tried with:
But also:
|
Hi @EmilioSantos-gif, by default, in Amplify JS v6, the To clarify, do you want to control the cache behavior for each An available alternative is to use |
I think the issue is resolved now since you clarified that the documentation is inaccurate. The reason I posted this issue was that the documentation stated that Thanks for providing the workaround with I appreciate your help! |
Hi @EmilioSantos-gif We appreciate that you’re following up and helping us consistently improve Amplify! Thanks! Before I close the issue, I still want to clarify, for your use cases, would you prefer to have a cache control option for the |
Environment information
Describe the bug
Summary
When using downloadData from @aws-amplify/storage, passing cacheControl: 'no-cache' does not prevent caching. Despite being removed in Amplify v6, the AWS Amplify Gen 2 documentation explicitly states that cacheControl: 'no-cache' should work to fetch the latest version of a file.
Expected Behavior
Passing
{ cacheControl: 'no-cache' }
should force fetching the latest version of the file, as described in the Amplify Gen 2 documentation.Reproduction steps
downloadData
from@aws-amplify/storage
to download a file from S3.{ cacheControl: 'no-cache' }
to attempt to fetch the latest version.The text was updated successfully, but these errors were encountered: