• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

how to build my own cache rebuild

marioman

Active member
#1
hi,

i used listener Template_Post_Render and render my own template then added it to tools_rebuild template

PHP:
case 'tools_rebuild':
                $temp_contents = $template->create('dev_tools_rebuild', $template->getParams());
                $content = $content . $temp_contents->render();
            break;
now new block displayed in admin.php?tools/rebuild
what next ?

how to i add my new cache to XenForo_CacheRebuilder_Abstract::$builders
 

marioman

Active member
#2
done
by add this

PHP:
            case 'XenForo_ControllerAdmin_Tools':
                $extend[] = 'dev_ControllerAdmin_Tools';
            break;
and my dev_ControllerAdmin_Tools i created action actionCacheRebuild() have this contents

PHP:
XenForo_CacheRebuilder_Abstract::$builders['SystemRelated'] = 'dev_CacheRebuilder_SystemRelated';
        return parent::actionCacheRebuild();
thanks for help!!