简体   繁体   中英

Is there a way to invalidate a file when I delete it from an amazon s3 bucket in C# (CloudFront cache issue)?

When I delete a file from amazon bucket through this:

s3.DeleteObject(object);

Is there a way to invalidate it to prevent the CloudFront cache problem?

This is a two step process. After deleting the object from S3, you will have to Invlidate the cache on CloudFront ( similar post ) using CreateInvalidationRequest() API call. CF keeps an object cached for 24hrs by default.

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