Can anyone tell me if what I have in mind makes sense, add any thoughts or correct mistakes on this please.
You can check out what I've posted to test so far @
http://soapbox.50free.net/forum/forum.php?catID=1&catname=All%20Things%20Political&forumID=1&forumname=GE%20Debate
Ok I've got a menu that along with other links has the main forum categories as well. When you expand the main category and mouseover a link you see some info regarding the forum.
Right now it works fine, but everytime someone requests a page the database goes through a whole series of queries to get PROBABLY the same information as the last page.
So my thought is:
would it be easier to dump the contents of the query into a php file (lets say nav.php) as variables and use that file instead of having to query the database every single time a page is loaded, by checking whether the file is older than 5 minutes and loading those variables stored in nav.php instead of querying the database.
Of course this means that I'm going to have to learn how to write this file and update it as well as making a few changes to the logic of the menu as it is.
So is it really worth it? What are the overheads on file checking in relation to querying the database?
At the moment I'm only testing it so it isn't under any load, but is it going to slow down the server much when a lot more people visit?
Cheers for any thoughts on this.