mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
added $exp_time-parameter of clear_cache() and clear_all_cache() to
cache_handler_func.
This commit is contained in:
@@ -993,7 +993,7 @@ class Smarty
|
||||
|
||||
if (!empty($this->cache_handler_func)) {
|
||||
return call_user_func_array($this->cache_handler_func,
|
||||
array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id));
|
||||
array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time));
|
||||
} else {
|
||||
$_params = array('auto_base' => $this->cache_dir,
|
||||
'auto_source' => $tpl_file,
|
||||
@@ -1015,8 +1015,9 @@ class Smarty
|
||||
function clear_all_cache($exp_time = null)
|
||||
{
|
||||
if (!empty($this->cache_handler_func)) {
|
||||
$dummy = null;
|
||||
call_user_func_array($this->cache_handler_func,
|
||||
array('clear', &$this, &$dummy));
|
||||
array('clear', &$this, &$dummy, null, null, null, $exp_time));
|
||||
} else {
|
||||
$_params = array('auto_base' => $this->cache_dir,
|
||||
'auto_source' => null,
|
||||
|
@@ -45,7 +45,7 @@ function smarty_core_write_cache_file($params, &$smarty)
|
||||
if (!empty($smarty->cache_handler_func)) {
|
||||
// use cache_handler function
|
||||
call_user_func_array($smarty->cache_handler_func,
|
||||
array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id']));
|
||||
array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
|
||||
} else {
|
||||
// use local cache file
|
||||
|
||||
|
Reference in New Issue
Block a user