OnSiteRefresh
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
$185 per month—let's make that $500!
Learn moreEvent: OnSiteRefresh¶
Fires after the cache for the entire site is cleared.
- Service: 1 - Parser Service Events
- Group: System
Event Parameters¶
| Name | Description |
|---|---|
| results | An array of results of the cache refresh. |
| partitions | An array of refreshed cache partitions. Passed only from the Clear Cache processor; from the system/refresh_site controller the event has no parameters. |
Example¶
<?php
$eventName = $modx->event->name;
switch($eventName) {
case 'OnSiteRefresh':
$modx->log(modX::LOG_LEVEL_ERROR, 'The cache is cleared '.print_r($partitions, 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
$185 per month—let's make that $500!
Learn more










