If you don't really need caching and plan to use it for one page only, you could try an alternative; writing a file and then flushing it back if specified time hasn't passed. I use it to read and parse third party websites, to check for new subtitles and output a RSS xml file.
<?php
if ((is_file($_SERVER['SCRIPT_FILENAME'].'.cached'))
&& (time()-filemtime($_SERVER['SCRIPT_FILENAME'].'.cached') < 3600))
{
readfile($_SERVER['SCRIPT_FILENAME'].'.cached');
exit;
}
echo $out;
$fp = fopen($_SERVER['SCRIPT_FILENAME'].'.cached', 'w');
fwrite($fp, $out);
fclose($fp);
?>
Note, that this only works for pages, which are without GET or POST variables, sessions, etc. You can change the number of seconds the cache works for (3600 = an hour). Also, use "$out.=" instead of "echo" command. Just store all output to that variable (if you need to use it inside a function, use "global $out" instead).
This workaround was written in about 5 minutes and may contain bugs.