delphirules
delphirules

Reputation: 7438

How to set no cache AT ALL on AWS S3?

I started to use AWS S3 to provide a fast way to my users download the installation files of my Win32 apps. Each install file has about 60MB and the download it's working very fast.

However when i upload a new version of the app, S3 keeps serving the old file instead ! I just rename the old file and upload the new version with the same name of the old. After i upload, when i try to download, the old version is downloaded instead.

I searched for some solutions and here is what i tried :

None of these fixed the issue, AWS keeps serving the old file instead of the new !

Often i will upload new versions, so i need that when the users try to download, S3 never use cache at all.

Please help.

Upvotes: 1

Views: 1879

Answers (1)

hjobrien
hjobrien

Reputation: 141

I think this behavior might be because S3 uses an eventually consistent model, meaning that updates and deletes will propagate eventually but it is not guaranteed that this happens immediately, or even within a specific amount of time. (see here for the specifics of their consistency approach). Specifically, they say "Amazon S3 offers eventual consistency for overwrite PUTS and DELETES in all Regions" and I think the case you're describing would be an overwrite PUT. There appears to be a good answer on a similar issue here: How long does it take for AWS S3 to save and load an item? which touches on the consistency issue and how to get around it, hopefully that's helpful

Upvotes: 1

Related Questions