Forum Moderators: open
The content does change but not often and I am wondering what techniques can be used so that if the content has not changed the page is loaded from a cache or something like that.
Would it be good to draw the information from an XML file and have the system check the last modified time of the XML file? I'm not sure I'm on the right track, any help is appreciated.
For example, after constructing a DB query, you can hash that query, and save the result of the query in a temporary file with the hash's name. Then, before running any query, you may first look if the corresponding file already exists, and if it does, read the data from the file instead of the DB - that would be much faster.
You can clear all the cache files when you insert or update data in the DB, and the consequent queries will be run on fresh data.