function Smarty::clear_cache in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/lib/smarty/Smarty.class.php \Smarty::clear_cache()
clear cached content for the given template and cache id
Parameters
string $tpl_file name of template file:
string $cache_id name of cache_id:
string $compile_id name of compile_id:
string $exp_time expiration time:
Return value
boolean
1 call to Smarty::clear_cache()
- Smarty::clear_all_cache in includes/
moodle/ lib/ smarty/ Smarty.class.php - clear the entire contents of cache (all templates)
File
- includes/
moodle/ lib/ smarty/ Smarty.class.php, line 937
Class
- Smarty
- @package Smarty
Code
function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) {
if (!isset($compile_id)) {
$compile_id = $this->compile_id;
}
if (!isset($tpl_file)) {
$compile_id = null;
}
$_auto_id = $this
->_get_auto_id($cache_id, $compile_id);
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,
$exp_time,
));
}
else {
$_params = array(
'auto_base' => $this->cache_dir,
'auto_source' => $tpl_file,
'auto_id' => $_auto_id,
'exp_time' => $exp_time,
);
require_once SMARTY_CORE_DIR . 'core.rm_auto.php';
return smarty_core_rm_auto($_params, $this);
}
}