Open chris-xylem opened 3 months ago
Helllo, @chris-xylem 👋 and thank you for opening this issue. There appears to be an error in the bullet points within the FAQ's on this page as you've pointed out. The cacheControl
option was indeed removed in v6 as called out in the migration guide that you linked above.
I'll create a docs issue for this to get the error corrected, but this option was removed intentionally in v6 to allow for the caching behavior to be primarily determined by the services and configurations involved in hosting and delivering your application.
Hello @cwomack, and thank you for the response on the issue. But the main question is how should we make a request that will be guaranteed to return the most recent version of the file. It's unbelievable that this option was intentionally removed without any alternative provided.
@cwomack I am also facing difficulties with these changes as I want to always fetch the most recent version in my case, and the cacheControl: 'no-cache'
did a great job for me. So I would really be interested in using something like this in the future.
One workaround that we've figured out is to enable versioning on the S3 bucket where the files are stored. Somehow that helps the method to fetch the most recent version of the file.
Hello - is there any update on this? We are building a website that has regulatory implications and users must be able to get the latest version of an S3 file
Is this related to a new or existing framework?
Angular
Is this related to a new or existing API?
Storage
Is this related to another service?
S3
Describe the feature you'd like to request
In AWS Amplify v5 we were able to pass
cacheControl: 'no-cache'
as an option to ensure we were downloading the most recent S3 object; that is no longer the case in v6 😞 .The documentation is also conflicting it reports the following:
https://docs.amplify.aws/gen1/angular/build-a-backend/storage/download/#frequently-asked-questions
But then in the migration steps reports:
https://docs.amplify.aws/gen1/angular/build-a-backend/storage/storage-v5-to-v6-migration-guide/
Not sure why this option was removed as we used it with our applications to ensure users were getting the most recent files from S3.
I feel as if this should be a feature that is added back in or provide a alternative to ensure we can get the most recent files from S3 when using AWS Amplify v6.
Describe the solution you'd like
AWS Amplify v6 users should be able to specify if they want a file to come or not come from cache like the feature that was enabled in v5.
Describe alternatives you've considered
I don't have an alternative unless the AWS Amplify team does.
Additional context
No response
Is this something that you'd be interested in working on?