private static function _displayCharacters(Api\Bracket $bracket) { $out = new stdClass(); Lib\Cache::setDisabled(true); $out->characters = Api\Character::getByBracketId($bracket->id); $out->bracket = $bracket; Lib\Display::renderAndAddKey('content', 'admin/characters', $out); Lib\Cache::setDisabled(false); }
/** * Refreshes various generic caches. This is expensive; use sparingly */ protected static function _refreshCaches(Api\Bracket $bracket = null) { Lib\Cache::setDisabled(true); // Refresh the main collections Api\Bracket::getAll(); Api\Bracket::getUserOwnedBrackets(self::$_user); \Controller\Brackets::generate(['past']); \Controller\Brackets::generate([]); // Refresh a single bracket if specified if ($bracket) { Api\Bracket::getBracketByPerma($bracket->perma); Api\Round::getCurrentRounds($bracket->id); $bracket->getResults(); } Lib\Cache::setDisabled(false); }