本文整理匯總了PHP中eZCache::clearAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZCache::clearAll方法的具體用法?PHP eZCache::clearAll怎麽用?PHP eZCache::clearAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZCache
的用法示例。
在下文中一共展示了eZCache::clearAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version 2014.07.0
* @package kernel
*/
$http = eZHTTPTool::instance();
$module = $Params['Module'];
$cacheType = $module->actionParameter('CacheType');
eZPreferences::setValue('admin_clearcache_type', $cacheType);
if ($module->hasActionParameter('NodeID')) {
$nodeID = $module->actionParameter('NodeID');
}
if ($module->hasActionParameter('ObjectID')) {
$objectID = $module->actionParameter('ObjectID');
}
if ($cacheType == 'All') {
eZCache::clearAll();
} elseif ($cacheType == 'Template') {
eZCache::clearByTag('template');
} elseif ($cacheType == 'Content') {
eZCache::clearByTag('content');
} elseif ($cacheType == 'TemplateContent') {
eZCache::clearByTag('template');
eZCache::clearByTag('content');
} elseif ($cacheType == 'Ini') {
eZCache::clearByTag('ini');
} elseif ($cacheType == 'Static') {
// get staticCacheHandler instance
$optionArray = array('iniFile' => 'site.ini', 'iniSection' => 'ContentSettings', 'iniVariable' => 'StaticCacheHandler');
$options = new ezpExtensionOptions($optionArray);
$staticCacheHandler = eZExtension::getHandlerClass($options);
$staticCacheHandler->generateCache(true, true);