/** * Empty cache for this template * * @param integer $exp_time expiration time * @return integer number of cache files deleted */ public function clearCache($exp_time = null) { Smarty_CacheResource::invalidLoadedCache($this->smarty); return $this->cached->handler->clear($this->smarty, $this->template_name, $this->cache_id, $this->compile_id, $exp_time); }
/** * Empty cache for a specific template * * @param string $template_name template name * @param string $cache_id cache id * @param string $compile_id compile id * @param integer $exp_time expiration time * @param string $type resource type * @return integer number of cache files deleted */ public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) { // load cache resource and call clear $_cache_resource = Smarty_CacheResource::load($this, $type); Smarty_CacheResource::invalidLoadedCache($this); return $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time); }
/** * Empty cache for a specific template * * @param string $template_name template name * @param string $cache_id cache id * @param string $compile_id compile id * @param integer $exp_time expiration time * @param string $type resource type * @return integer number of cache files deleted */ public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) { Smarty::muteExpectedErrors(); // load cache resource and call clear $_cache_resource = Smarty_CacheResource::load($this, $type); Smarty_CacheResource::invalidLoadedCache($this); $t = $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time); Smarty::unmuteExpectedErrors(); return $t; }