Purge cache by URLs

Efficiently eliminate one or multiple files from iSmartFrame's cache by specifying URLs.

POST https://app.ismartframe.com/api/v1/cache/purge/

🌎If you are using the 'Cache By Country' feature on your website, it will be necessary to include the country code as an extra parameter in the request body.

Query Parameters

NameTypeDescription

api_key*

String

Your API Key

Request Body

NameTypeDescription

url*

Array of strings

List of URLs requiring a cache purge. URLs must be relative (e.g., /test), thereby excluding the website's domain.

country

String

ISO 3166-1 alpha-2 Country Code

Cache purge successful. This operation may take a few minutes to propagate across all data centers.

curl --location 'https://app.ismartframe.com/api/v1/cache/purge?api_key=YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "url": [
        "/test1", 
        "/test2/test" 
    ]
}'

How does it work?

When our systems cache a page, they do that for the specific device type (mobile, desktop, bot...) responsible for initiating the rendering of the web page. This API facilitates the removal of all cache versions (spanning across all device types) associated with a specific page. It strictly processes URLs, meaning that, supposing you furnish '/' as one of the URLs, it will exclusively purge the home page of your website, leaving the rest of your website's cache unaffected. If you want to purge cache based on patterns, you should define tags.

Last updated