This question has been answered by sottwell. See the first response.
$this->modx->cacheManager->refresh()
$chunk = $modx->getChunk('CacheUpdates');
if ($chunk) {
$content = $chunk->getContent();
$chunk->setContent($content . "\n" . 'OnBeforeCacheUpdate fired: ' . date("D M d, Y G:i a"));
$chunk->save();
}
/* invoke OnCacheUpdate event */
$this->modx->invokeEvent('OnCacheUpdate', array(
'results' => $results,
'paths' => $paths,
'options' => $options,
));