4 * Smarty Method ClearCache
6 * Smarty::clearCache() method
9 * @subpackage PluginsInternal
12 class Smarty_Internal_Method_ClearCache
15 * Valid for Smarty object
22 * Empty cache for a specific template
24 * @api Smarty::clearCache()
25 * @link http://www.smarty.net/docs/en/api.clear.cache.tpl
27 * @param \Smarty $smarty
28 * @param string $template_name template name
29 * @param string $cache_id cache id
30 * @param string $compile_id compile id
31 * @param integer $exp_time expiration time
32 * @param string $type resource type
34 * @return integer number of cache files deleted
36 public function clearCache(Smarty $smarty, $template_name, $cache_id = null, $compile_id = null, $exp_time = null,
39 $smarty->_clearTemplateCache();
40 // load cache resource and call clear
41 $_cache_resource = Smarty_CacheResource::load($smarty, $type);
42 return $_cache_resource->clear($smarty, $template_name, $cache_id, $compile_id, $exp_time);