iSmartFrame API Docs
  • Introduction
  • API keys
  • Rate Limits
  • APIs
    • Purge cache by URLs
    • Purge cache by Tags
    • Purge cache by Pattern
Powered by GitBook
On this page
  • Efficiently eliminate one or multiple files from iSmartFrame's cache by specifying URLs.
  • How does it work?

Was this helpful?

  1. APIs

Purge cache by URLs

PreviousAPIsNextPurge cache by Tags

Last updated 1 year ago

Was this helpful?

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

Name
Type
Description

api_key*

String

Request Body

Name
Type
Description

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

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" 
    ]
}'
const axios = require('axios');
let data = JSON.stringify({
  "url": [
    "/test",
    "/test2/test"
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://app.ismartframe.com/api/v1/cache/purge?api_key=YOUR_API_KEY',
  headers: { 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

How does it work?

Your

ISO 3166-1 alpha-2

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
API Key
Country Code