/** * Show the cache * * @since 1.5 */ function showCache() { global $mainframe, $option; $submenu = JRequest::getVar('client', '0', '', 'int'); $client =& JApplicationHelper::getClientInfo($submenu); if ($submenu == 1) { JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_cache&client=0'); JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_cache&client=1', true); } else { JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_cache&client=0', true); JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_cache&client=1'); } $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit')); $limitstart = $mainframe->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0); $cmData = new CacheData($client->path . DS . 'cache'); jimport('joomla.html.pagination'); $pageNav = new JPagination($cmData->getGroupCount(), $limitstart, $limit); CacheView::displayCache($cmData->getRows($limitstart, $limit), $client, $pageNav); }
function purgeCache() { // Check for request forgeries JRequest::checkToken() or jexit('Invalid Token'); $cache =& JFactory::getCache(''); $cache->gc(); CacheView::purgeSuccess(); }