Hello Alexander,
Specifically, the purge_pattern parameter allows you to purge specific resources without purging a site's entire cache. For example, if you had a large number of GIF images that you had modified and wanted to only purge the cached GIFs, you could use an API call along the following lines:
https://my.incapsula.com/api/prov/v1/sites/cache/purge?api_id=X&api_key=Y&site_id=Z&purge_pattern=.gif$
This would purge anything that ends with ".gif". Alternatively, if you had a large number of files that began with "example_file", you could do the following:
https://my.incapsula.com/api/prov/v1/sites/cache/purge?api_id=X&api_key=Y&site_id=Z&purge_pattern=^example_file
This would purge anything that began with "example file".
Note that this parameter is also optional - if all you wish to do is simply purge the entire site cache, you can do so by omitting the "purge_pattern" parameter.
------------------------------
Clinton Nicholls III
------------------------------
Original Message:
Sent: 05-19-2020 08:24
From: Alexander Martyniuk
Subject: purge_pattern in API purge cache
Hello,
I'm using Imperva Cloud WAF. There is a feature to purge cache using API. But I'm not sure what does purge_pattern parameter means. Can anyone give an example of this parameter?
The link with information where I read about cache purging is below.
https://docs.imperva.com/bundle/cloud-application-security/page/api/sites-api.htm#Purge
#CloudWAF(formerlyIncapsula)
------------------------------
Alexander Martyniuk
------------------------------