Skip to content

Bring Back cacheControl as Storage Option in v6 #13581

Open
@chris-xylem

Description

@chris-xylem

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:

downloadData is cached; if you have recently modified a file you may not get the latest version right away. You can pass in cacheControl: 'no-cache' to get the latest version.

https://docs.amplify.aws/gen1/angular/build-a-backend/storage/download/#frequently-asked-questions

But then in the migration steps reports:

cacheControl: This option has been removed and now defers to the HTTP caching behavior configured by the runtime.

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?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

Labels

StorageRelated to Storage components/categorydocumentationRelated to documentation feature requestsfeature-requestRequest a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions