Maybe BobRay has put this out to the world but I have not run across it anywhere.
I am tired of battling both cache issues and [[!Include? ...]] tags for local development. Things are constantly cached when I don't want them to be and cache_disabled does not actually work in the core.
CacheClear to the rescue.
- Download and install CacheClear
- Create Plugin
- Copy code below into plugin
- Set System Event to "OnWebPageComplete"
- Set System Setting cache_disabled = to Yes
Now on the completion of every page request the cache is dumped
<?php
if ($modx->context->key == 'mgr') return;
if((boolean) $modx->getOption('cache_disabled',null,false)){
$modx->runSnippet('CacheClear');
}
Now we can go back to using static elements in local dev without having to clear cache all the time.