Home About News Products Blog

Can I programmatically clear the cache?


#1

To programmatically clear the cache you can use our API endpoints. There is documentation regarding the API located here: https://www.section.io/docs/api/

For authentication you will want to use the same credentials you use to login to section.io’s Aperture portal.

You can also test out all of our API endpoints using this tool: https://aperture.section.io/api/ui/#/ which will also generate a curl request for you after you try it out.


#2

Hi, can you point out which API endpoint is used to clear cache? Thanks


#3

You can send cache flush ban expressions using this API end point.
https://aperture.section.io/api/ui/#!/Proxy/proxyStatePost


#4

You can use the ban expression with the API call https://aperture.section.io/api/ui/#!/Proxy/proxyStatePost to clear specific parts of the cache.

For example, if you wish to clear all the objects for a single domain you can use the ban expression from the screenshot.
image

If you click the “try it now” button, it will perform the cache flush request as well as generate a CURL or HTTP URL you can use as a template to write automated scripts to perform the same cache flush function.
You will need to use basic auth in CURL.