function clearCache() { global $modx; include_once $modx->config['base_path']."manager/processors/cache_sync.class.processor.php"; $sync = new synccache(); $sync->setCachepath($modx->config['base_path'].'assets/cache/'); $sync->setReport(false); $sync->emptyCache(); }