[thelist] Caching: PHP or Clientside

Matt Warden mwarden at gmail.com
Thu Sep 23 13:05:01 CDT 2004

On Thu, 23 Sep 2004 12:42:48 -0400, Mr. Tenuta <dtportnoy at videotron.ca> wrote:
> The obvious problem is that this menu grabs from the DB each page hit. Right now user level is low so the speed is fine, but I know this will be a huge problem once the site is launched.

I would suggest that you wait and see how the site performs once it is launched.

Your solution to "cache" in the DB is not going to save you much
processing time.

If indeed you do need to put work into optimizing this for
performance, this i what I would suggest:

use conditional includes:

if (isLoggedIn() && isAdmin())
elseif (isLoggedIn() && isStaff())

then, every n hours, have a cron job that simply calls a php script
which builds those files from the database content.

But, again, I would wait and see how the site performs before putting
in time optimizing. There's a famous quote I could include here, but I
will spare you. :)

Matt Warden
Miami University
Oxford, OH

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list