/** * Delete liberty cache * * @param array $pContentId * @access public * @return TRUE on success, FALSE on failure */ function expungeCache() { global $gBitSystem; $ret = FALSE; if ($gBitSystem->isFeatureActive('liberty_cache')) { $cacheDir = LibertyContent::getCacheBasePath(); // make sure that we're in the temp dir at least if (strstr($cacheDir, str_replace('//', '/', TEMP_PKG_PATH))) { unlink_r($cacheDir); // make sure we have a usable cache directory to work with $ret = is_dir($cacheDir) || mkdir_p($cacheDir); } } return $ret; }