Hi - Im a beginner with php. I just found this article about caching php pages as html for faster access - and I thought that if it can be adapted to work with Dolphin then its probably a very valuable idea as our main Hompages tend to load pretty slowly, no?
http://papermashup.com/caching-dynamic-php-pages-easily/
Heres the relevant code in case you cant be bothered to click the link
$cacheFile = 'cache/index-cached.html';
$cacheTime = 4 * 60;
// Serve the cached file if it is older than $cacheTime
if (file_exists($cacheFile) && time() - $cacheTime < filemtime($cacheFile)) {
include($cacheFile);
exit;
}
// Start the output buffer
ob_start();
/* Heres where you put your page content */
// Cache the contents to a file
$cached = fopen($cacheFile, 'w');
fwrite($cached, ob_get_contents());
fclose($cached);
ob_end_flush(); // Send the output to the browser
So if it would work where in the site would one put this code?
DV