This feature is enabled with the UseCache variable.
The usual problem with pre-generating or caching Wiki HTML is that links to NonDefinedPages? (like this one) could be defined at any time. The HTML for the page needs to be regenerated when other pages are defined.
My proposed solution:
When a browse request is sent, check for a HTML cache file. If the cache file exists, send it.
If the cache file does not exist, but a database entry exists, generate the HTML file and send it.
If neither the cache file nor the database entry exist, then edit the page as new.
When a new page is created, search all the existing pages for backlinks. Delete the HTML cache files for each page referencing the new page. The next user to browse each referencing page will recreate the HTML cache.
Edits to a page should recreate the cache file when saving the new page.
This plan may have a tiny race if a cache file is detected by a reader (which does not lock), and another user removes the file before/while the first user reads it.
Question: How do I refresh and update the HTML cache in the current release? I did not use the HTML cache for a while, and now that I am trying to again all the pages displayed are outdated. Thanks.
Thanks, Clifford. It's working.
Why go through the perl script to reach a cached page? Why not save the cache pages as /pagename.html and give that URL directly? that way the script would only be called for edit pages, saving, RC, history and diffs -- Tarquin