On my web site I have two main categories. In those two categories I have a function that grabs all the folders, checks to see if the folder has an article header and that $not_live is not true (this keeps articles I'm still working on from appearing in the index).
After it gets all the valid reviews into an array (multidimensional, keeps some info, such as name, title, and date). Then I have it sort the all the reviews by date. Then finally they are split up into their categories and listed seperately onto the page.
That is a lot of work for the server to be doing each time someone visits the page.
So, I'm trying to figure out a good way to cache this. I was thinking about doing a 'touch file' implementation. But my articles aren't store in an SQL db (or any db). They are stored just as text with html formatting and then loaded into the template.
So, how do I tell my indexing page when there is a new article to add to the index? I was thinking that I could keep a file with the count of articles in it and then recount the number of dir's with $not_live != TRUE and then compare the two numbers. But then I'm almost doing the same amount of work :/
Any ideas? I hope I'm being clear
PS http://www.xtremetek.com/reviews/index.php - here is one of the pages I am talking about.