Automatic Cache Purge

Hi, we need to purge cache from time to time.

I read there is a way to clear cache via URL:

If our API is: abcdegc
and our zone is: 1234567

Does it mean we just need to add the following to a cron job:

Thank you so much. We are not trained coders. Consider us quite ignorant about computer stuff. Just trying to make this work.


I generally create a shell script, like that has the curl command on one line. And then call that script from cron.

I do not know how to write such a script. Is there a alternative? Also, can the script be stored somewhere in the cloud?

If you have command line access on a server, this should work. Just make sure the script has execute permissions for everybody. It’s not a good idea to store it in the cloud because it has your API key.

curl -X POST "" \
 -H "X-Auth-Email: [email protected]" \
 -H "X-Auth-Key: API_KEY" \
 -H "Content-Type: application/json" \
 --data '{"files":[""]}'

I’m not sure if the syntax is perfect. The example had a lot more data for more URLs to purge.

There’s a Worker that can do a Purge Everything that executes if you hit a specific URL. You really need to get a “trained coder” to execute specialized functions such as this.

The easiest way of doing it is via the dashboard.

  1. Click on your domain
  2. Click on the blue caching icon at the top

This topic was automatically closed after 30 days. New replies are no longer allowed.