Retry curl request 5 times if it fails

If the curl request fails when clearing, retry 5 times, gradually increasing the time between retries (from 1 to 5 seconds).