Forum Moderators: coopster

Message Too Old, No Replies

Help with quality caching

What is the best way to cache pages?

         

alexorig

5:15 am on Aug 16, 2006 (gmt 0)

10+ Year Member



I have been running sites on php and mysql for a few years now and some of my old sites have become _really_ clunky with out of date code and cumbersome queries to my databases.

What is particularly silly is that many of the pages call the database to check up on data which only get updated a few times a week. So I am planning to set up the site to run a little faster. I have had a couple of ideas of how to do this and wanted to get anyone's thoughts/experience around this.

My thought is to have a static php page (with just adserving as an included script) which gets rewritten every time I or a user updates the database... is this a good way to progress? How does everyone else do caching?

Frank_Rizzo

3:01 pm on Aug 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use includes for common bits of text such as adsense, menus etc.

Don't forget to keep your databases lean and trim so that it's more likely the database will be cached.

If you have a dedicated linux server look at things like tuning the file system (remove atime from the disk), optimising the memory for apache, and mysql. Use something like MySysop (that and others available at forge.mysql.com) to check your parameters are tuned.

Use a seperate disk for log files and temp files.