Closed anjanvb closed 3 years ago
Nevermind. Gotta use cacheControl: 'no-cache'
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Storage
Amplify Categories
storage
Environment information
Describe the bug
It looks like
Storage.get()
continues to serve the content from (disk cache) even with smaller expiry. My use case is pretty simple. I've got a JSON file in a prefix in S3, I need to be able to update the file and read the file from the React app. Since theget
request continues to be served from disk cache the application continues to see outdated content.I've tried with very large and very small (like 2 seconds) of
expires
time but the behavior is consistent. Wondering if this is an expected behavior.Expected behavior
Each call to
Storage.get()
should return the current (available) content in the S3 bucket.Reproduction steps
Storage.get()
requests to the file to see the file contentStorage.get()
call again to get updated content from S3Storage.get()
continues to serve data from disk cache which is outdated.Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response