mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- add Smarty_Internal_Template::clearCache() to accompany isCached() fetch() etc.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user