You can flush the Fasterize cache in three ways:


Dashboard


In the Dashboard tab of the Fasterize Admin Console, you can find a Clear Cache  button in the Actions column. Click on it and confirm.




or on the configuration overview page:

API


You can also use the API to clear the cache of all resources or specific resources. You will find the API token on your dashboard and the identifier of your configuration in the dashboard URL of your configuration. For example, https://www.fasterize.com/en/website_configs/1/dashboard has for configuration ID 1 .


# Empty the cache for all domains of the configuration

curl -i -H 'Content-Type: application/json' -H "Authorization: $myApiToken" -X DELETE https://api.fasterize.com/v1/configs/$config_id/cache


# Empty the cache for a domain list of the configuration

curl -i -H 'Content-Type: application/json' -H "Authorization: $myApiToken" -X DELETE -d '{"domains" : ["mydomain1.com", "mydomain2.com"]}' https://api.fasterize.com/v1/configs/$config_id/cache


Flushing by domain  increment the versioning number in the parameter frz-v.


# Empty the cache for an url

curl -i -H 'Content-Type: application/json' -H "Authorization: $myApiToken" -X DELETE -d '{"url" : "http://mydomain.com/logo.png"}' https://api.fasterize.com/v1/configs/$config_id/cache


The URL specified as a parameter must match the URL of the static resource in the optimized page or match the page URL. Flushing by URL  doesn't increment the versioning number in the parameter frz-v.


If you want to flush the cache asynchronously , simply add the pingbackUrl parameter   to the contents of the query. This URL will be called when the Fasterize cache dump is complete. This request is a POST containing the status of the operation (done or error) in JSON format:


curl -i -H 'Content-Type: application/json' -H "Authorization: $myApiToken" -X DELETE -d '{"domains" : ["mydomain1.com"], "pingbackUrl" : "www.myadmin.com/flush_status"}' https://api.fasterize.com/v1/configs/$config_id/cache


By URL


By adding the frz-flush = true parameter to a URL, it will be updated in the Fasterize cache from the original resource.

For example, it is possible to refresh the cached page (and only the HTML page, not the resources it uses) https://www.fasterize.com by adding this parameter to the URL of the page: https: //www.fasterize.com/?frz-flush=true


Note: this method has a disadvantage. It only flushs the corresponding version of the same device (mobile, desktop, etc.).