Beispiel #1
0
 /**
  * Gets a controller response that reroutes to start rebuilding the caches.
  * Admin CP only.
  *
  * @param XenForo_ControllerAdmin_Abstract $controller
  * @param array $caches List of caches to build. Either array of strings, or array of pairs: [cache name, options]
  * @param string|null $redirect URL to redirect to; null to use referrer
  *
  * @return XenForo_ControllerResponse_Reroute
  */
 public static function getRebuilderResponse(XenForo_ControllerAdmin_Abstract $controller, $caches, $redirect = null)
 {
     $controller->getRequest()->setParam('caches', $caches);
     if ($redirect !== null) {
         $controller->getRequest()->setParam('redirect', $redirect);
     }
     return $controller->responseReroute('XenForo_ControllerAdmin_Tools', 'cacheRebuild');
 }