简体   繁体   中英

Rackspace / Openstack PHP sdk CDN clearing out cache after upload

I am currently using an implementation of the php sdk for rackspace to upload files to a container called testcontainer. I am using a library that interacts with the sdk but I think I'll need to write it natively to accomplish what I'm looking for. Before I do this I haven't been having much luck finding out how to clear rackspace's cache.

The problem I run into (in case its not a caching issue for whatever reason) is...

  1. Upload a file called test.jpg
  2. visit the cdn endpoint /test.jpg and see my image
  3. locally change the image to something else but keep the name test.jpg.
  4. Upload the file to the same cdn container replacing the other test.jpg.
  5. visit the cdn endpoint/test.jpg however the image is still the original test.jpg, not my new image.

This looks like a caching issue, I know in your account you can clear the cache and reset it but haven't been able to find any reference in the documentation.

Any ideas? Thanks.

If you have set your CloudFiles containers as CDN what you are seeing is indeed a caching issue. Unfortunately there's no practical way to flush the caches at scale and even if it was just one object, it could take minutes to be propagated globally. For more info how to flush CDN caches for individual objects and limits thereof, please see: here.

And of special attention:

You can use the DELETE operation against a maximum of 25 objects per day using the API

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