Hi all !!
I was wondering about the _disqply_cache_ function in /system/libraries/Ouput.php
Before the function call, in codeigniter.php
$CFG =& load_class('Config');
$RTR =& load_class('Router');
$OUT =& load_class('Output');
/*
* ------------------------------------------------------
* Is there a valid cache file? If so, we're done...
* ------------------------------------------------------
*/
if ($EXT->_call_hook('cache_override') === FALSE)
{
if ($OUT->_display_cache($CFG, $RTR) == TRUE)
{
exit;
}
}
So config oud router are passed by ref.
But in the function there is :
/**
* Update/serve a cached file
*
* @access public
* @return void
*/
function _display_cache(&$CFG, &$RTR)
{
$CFG =& load_class('Config');
$RTR =& load_class('Router');
$cache_path = ($CFG->item('cache_path') == '') ? BASEPATH.'cache/' : $CFG->item('cache_path');
if ( ! is_dir($cache_path) OR ! is_writable($cache_path))
{
return FALSE;
...
...
I am not sur this is exact.
There is no need to load again those classes.
Perhaps is there a particular reason but ...
Bye
