Purging cache?

I have a PHP script that uses CURL to upload 3 files to CF.


The script first deletes the files on Cloudflare if they exist, then uploads the new versions to CF.

When I view the images they appear to be cached and show the old versions. The CURL DELETE does not seem to purge the cache and all of the API documentation seems to be about having a zone identifier which I don’t appear to have.

I am just using Cloudflare Images to store images, not serve my whole website.

Surely there is a way I can tell Cloudflare to purge files by filename prior to uploading new versions?


BTW the code that deletes the files returns “success = true” in the JSON and when I look at the list of images under Images > Overview in my account dashboard, the images do disappear from the list.

So I think I’m doing everything right and I’ve fine-tooth-combed my PHP and files to be as sure as I can that the updated files I am uploading are correct.

Images should purge cache on DELETE.
When did you face the issue? I tried it manually and it works as expected.

I made a mistake.

It was actually caching on my browser side prior to uploading to Cloudflare.

I’ve now hashed the filename in my upload system to ensure nothing caches.

1 Like