Auto Clear Cache

Quick Question?
I Want to Clear the Full Website Cache Every 8 Hours.
I Have the Pro Plan, no specific URL, just the whole website.

What is the Simplest and easiest way to do this?

A cronjob that makes the API call:

1 Like
  1. Just create a file ( on a linux instance of you choice.
  2. write this into the file:
EMAIL="[email protected]"

curl -X DELETE "$ZONE_ID/purge_cache" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $API_KEY" \
     -H "Content-Type: application/json" \
     --data '{"purge_everything":true}'
  1. make it executable (chmod +x
  2. set a cronjob that executes it all 8 hours (0 */8 * * * /path/to/your/file/

Have fun

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.