OnCacheUpdate
Last updated Oct 14th, 2026 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moreEvent: OnCacheUpdate¶
Fires after the site cache is cleared, in modCacheManager::clean() and modCacheManager::refresh().
- Service: 4 - Cache Service Events
- Group: System
Event Parameters¶
| Name | Description |
|---|---|
| results | The results of the clearing. |
| paths | An array of paths that were to be cleared. |
| options | An array of options passed to the cache clearing method. |
Example¶
$eventName = $modx->event->name;
switch($eventName) {
case 'OnCacheUpdate':
$modx->log(modX::LOG_LEVEL_ERROR, print_r($results, true));
break;
}
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










