How do you 'cache' a page?
View Single Post
02-27-2007, 03:36 PM
Join Date: Mar 2005
You could store a copy of the generated page in the database or in a text file then just load that copy as needed instead of generating the page for each view.
To update the page you could do that whenever one of the values shown on the page is changed (ie: inserting/deleting/updating a row that would change the cached page).
Another option might be storing the time that the cached page was generated. When fetching the page, determine if the time is more than x minutes in the past. If so, then regenerate the page, update the last generated time and continue on as normal.
View Public Profile
Send a private message to mikem
Find More Posts by mikem