[eluser]deadelvis[/eluser]
Answering my own question here... this seems to do the trick:
Code:
<?php
class MY_Output extends CI_Output {
function _display_cache(&$CFG, &$URI) {
session_start();
if (@$_SESSION["some_var"]==true){
return false;
} else {
return parent::_display_cache(&$CFG, &$URI);
}
}
function _write_cache($output){
if (@$_SESSION["some_var"]==true){
return;
} else {
return parent::_write_cache($output);
}
}
}
?>
File cache is not read or written to, as long as that native PHP session variable is true.
I know this approach might not be very pretty but it is probably the simplest solution to completely bypass CI's file caching when this is necessary for a single condition (Example: Displaying admin links together with regular content when admin is logged in).