$events = array('OnDocFormSave');
$eventName = $modx->event->name;
if (in_array($eventName, $events)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $modx->getOption('site_url') . $resource->uri);
curl_setopt($ch, CURLOPT_FAILONERROR,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$retValue = curl_exec($ch);
curl_close($ch);
}
return true;
This question has been answered by BobRay. See the first response.
You might look at the CacheMaster extra. It may do what you want. If it doesn't, you may find the code helpful.