deprecated

Purge Cache

​

You can purge cache for any image by using our cache purge API.

Path Parameters

  • Subdomain is same subdomain you created while creating source. If you serve image from example.gumlet.com, please enter only 'example' for this parameter.

Body

application/json
  • An array of path of images to purge. It should be provided without any query parameters.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/purge/{subdomain}
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const imageSource = await client.imageSources.purgeCache('subdomain', {
  paths: ['image.jpeg', 'image2.png'],
});

console.log(imageSource);
{
  "status": "pending"
}