/**
  * Empty cache for this template
  *
  * @param integer $exp_time expiration time
  *
  * @return integer number of cache files deleted
  */
 public function clearCache($exp_time = null)
 {
     Smurty_CacheResource::invalidLoadedCache($this->smurty);
     return $this->cached->handler->clear($this->smurty, $this->template_name, $this->cache_id, $this->compile_id, $exp_time);
 }
Пример #2
0
 /**
  * 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 = Smurty_CacheResource::load($this, $type);
     Smurty_CacheResource::invalidLoadedCache($this);
     return $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time);
 }