简体   繁体   中英

How to clear cache of static site on S3

Ok, I got a static site hosted on S3 which is in fact an Angular App. I use the gulp module S3 upload to upload all my files to S3.

The problem I'm having is that the files seems to be uploaded ok, however when I visit the site, it looks like is serving an older version of the files and NOT the recently uploaded files. I've tried deleting all files from the bucket and upload again, yet the old file is still served on the site. If I download the file, I can see that the file in the bucket it is indeed the right file, but just doesn't get served.

I'm not using Cloudfront for this particular bucket. Do I need to? Or is there a way to clear the cache?

Thanks in advance for your help.

These are a bunch of excuses. This is a caching issue. The issue is that Amazon s3 services have a poorly designed interface, so you need to 'invalidate' the pages, which is a long garbage process, compared to most the competitors who just have a simple clear cache button. Very BAD design by Amazon!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM