- add Smarty_Internal_Template::clearCache() to accompany isCached() fetch() etc.

This commit is contained in:
rodneyrehm
2011-10-14 17:15:06 +00:00
parent ef32ed830c
commit 59a95253b4
2 changed files with 14 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
14.10.2011
- bugfix unique_resource did not properly apply to compiled resources (Forum Topic 20128)
- add locking to custom resources (Forum Post 75252)
- add Smarty_Internal_Template::clearCache() to accompany isCached() fetch() etc.
13.10.2011
- add caching for config files in Smarty_Resource

View File

@@ -564,6 +564,19 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
{
throw new SmartyException("Not matching {capture} open/close in \"{$this->template_resource}\"");
}
/**
* 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);
}
/**
* set Smarty property in template context
*