function &getInstance(GantryRegistry $params) { global $gantry; $conf = JFactory::getConfig(); if ($conf->getValue('config.caching') && $params->get("module_cache", 0)) { $user =& JFactory::getUser(); $cache =& JFactory::getCache('Gantry'); $cache->setCaching(true); $cache->setLifeTime($gantry->get("cache-time", $conf->getValue('config.cachetime') * 60)); $args = array(&$params); $checksum = md5($args[0]->_raw); $gantrymenu = $cache->get(array('GantryMenu', '_getInstance'), $args, 'GantryMenu-' . $user->get('aid', 0) . '-' . $checksum); } else { $gantrymenu = GantryMenu::_getInstance($params); } return $gantrymenu; }