Exemple #1
0
 function deleteCache($cid)
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
     $cmData = new CacheData($client->path . DS . 'cache');
     $cmData->cleanCacheList($cid);
 }
Exemple #2
0
 /**
  * Clear Joomla Cache By groups, just apply for the front-page.
  *
  * @param array $group
  */
 function clearCacheByGroups($params, $groups)
 {
     // include cache model from the cache component
     $file = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_cache' . DS . 'cache.class.php';
     if (file_exists($file)) {
         $client =& JApplicationHelper::getClientInfo(0);
         $cmData = new CacheData($client->path . DS . 'cache');
         return $cmData->cleanCacheList($groups);
     }
 }