I am using a JSON file from the s3 which is uploaded after certain changes are made in the system. Due to the cache, I'm not getting the updated JSON even though is it deleted before the new one gets uploaded.
Asked
Active
Viewed 737 times
0
1 Answers
1
Laravel itself doesn't have anything for that but the AWS PHP SDK does.
You basically want to invalidate the file (createInvalidation
) so that the next time a request is made for that file, CloudFront will fetch a fresh copy rather than serving a cached copy. Alternatively you can use file versioning so that you don't have to invalidate files.

Peppermintology
- 9,343
- 3
- 27
- 51