There are a heap of ways you can do this.
You could create a cron script that populates a field in a database with the relevant HTML output of your pages and then you could make this script manageable via commands of refreshing in the code. This is basically how most CMS's work these days.
I'm still unconvinced that file-based serving is faster than simple database record serving. I could be wrong ...
If you still (must) do it the file way, you can do this via php file methods in your scripts.
Remember, the cron script only needs to point to the script which generates the code - you don't have to do it all in the cron script.
The site navigation only needs to reference the cached page address (file or script).
Remember to update your robots.txt to disallow access to the code generating scripts, or place these scripts outside your virtual host directories.
|