If you're concerned about your sites performance while PHP is caching files then you should use APC It gives you the means for caching as a key/value store.
When you're ready to retrieve then you would make a call like the following:
$data = apc_fetch($key);
When you're ready to retrieve then you would make a call like the following:
$data = apc_fetch($key);