The file cache is enabled by setting three variables in config:
This causes the rendered HTML webpage for each page of the wiki to be stored in an individual file on the hard disk. Any subsequent requests from anonymous users are met not by rendering the page again, but by simply sending the stored HTML version which is on the disk. This saves time.
The generated HTML web text is stored to disk in directories under the ... and looks somewhat like:
Caching is only done for users who:
- are not logged in.
Caching is only done for pages which:
- are not redirects.
- are being viewed in current version, plain view, no url parameters
This covers the majority of requests to the wiki.
The modification time of the cached file is compared with the global timestamp set in settings on each view.
If the file is at least as new as both of these, it is considered valid and is sent directly to the client. If it is older or does not exist, parsing and rendering continues and the results are saved for future use.