Page MenuHomeCode

smarty_method_clear_all_cache.php
No OneTemporary

smarty_method_clear_all_cache.php

<?php
/**
* Smarty method Clear_All_Cache
*
* Empties the cache folder
*
* @package Smarty
* @subpackage SmartyMethod
* @author Uwe Tews
*/
/**
* Empty cache folder
*
* @param object $smarty
* @param integer $exp_time expiration time
* @param string $type resource type
* @return integer number of cache files deleted
*/
function Smarty_Method_Clear_All_Cache($smarty, $exp_time = null, $type = 'file')
{
// load cache resource
if (!isset($smarty->cache_resource_objects[$type])) {
$_cache_resource_class = 'Smarty_Internal_CacheResource_' . $type;
if (!$smarty->loadPlugin($_cache_resource_class)) {
throw new Exception("Undefined cache resource type {$type}");
}
$smarty->cache_resource_objects[$type] = new $_cache_resource_class($smarty);
}
return $smarty->cache_resource_objects[$type]->clearAll($exp_time);
}
?>

File Metadata

Mime Type
text/x-php
Expires
Sat, Feb 22, 15:27 (7 h, 47 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25396
Default Alt Text
smarty_method_clear_all_cache.php (892 B)

Event Timeline