/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$cacheFile = 'cache/index-cached.html'; $cacheTime = 4 * 60; // Serve the cached file if it is older than $cacheTime include($cacheFile); exit; } // Start the output buffer /* Heres where you put your page content */ // Cache the contents to a file
URL: http://papearmashup.com/caching-dynamic-php-pages-easily