I recently worked on a project on .NET and part of the code involved reading the header and footer from a pre-defined format for consistency across various websites shared by the same client.
I am faced by a similar problem in php. I get the contents of the header/footer links using:
<?php
$contents = file_get_contents('http://www.mysite.com/common/footer.asp');
echo $contents;
?>
Is there a way I can load this into cache to avoid repeated calls to http://www.mysite.com/common/footer.asp
Cheers
If your looking to cache across many page loads, you could use the session.
Or into persistent storage like a flat file, database or memcache.