1. Home
  2. API
  3. Guides
  4. Snapt Aria Web Accelerator: Purge a Cache Domain

Snapt Aria Web Accelerator: Purge a Cache Domain

Command-line example for deleting matching content in the Snapt Aria Web Accelerator cache (purge). This is useful for deployment scripts, etc. You will be calling the snaptNginx.purgeCacheString method with the argument array of (string). The change takes immediate effect.

The XmlRpc URL for these requests is http://snapt/api/key/secret/snaptNginx/

Code Example

$string = 'www.snapt.net'; // String to purge

$api = 'snaptNginx'; // Accelerator
$method = 'purgeCacheString'; // method being called

$call = $api . '.' . $method;
$args = $string;
$result = getClient($api)->call($call, $args); // Send your XMLRPC request
function getClient($api) {
$client = new Zend_XmlRpc_Client( 'http://' . SERVER . '/api/' . APIKEY . '/' . APISECRET . '/' . $api . '/');
$client->getHttpClient()->setConfig(array('timeout' => 10));
return $client;
}
Updated on March 18, 2020


Was this article helpful?

Related Articles