CodeIgniter Forums
Cache Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Cache Problem (/showthread.php?tid=13695)



Cache Problem - El Forum - 12-02-2008

[eluser]Unknown[/eluser]
If I set a custom cache path in the config.php file ($config['cache_path']) codeIgniter ignores the $config['enable_cache']directive.


Cache Problem - El Forum - 12-02-2008

[eluser]Unknown[/eluser]
I solved my problem editing the method cache in codeigniter/libraries/output.php.

Code:
function cache($time)
{
  $CI =& get_instance();    
  $enable_cache = $CI->config->item('enable_cache');
  $this->cache_expiration = (
    (is_numeric($time) && $enable_cache) ?
    $time :
    0        
  );
}

I have no idea if this is the best place but at least it made some sence.
Tiago