PDA

View Full Version : PHP Caching Method



junkeeper
23 Jan 2010, 11:22 AM
Hi guys,

I need to seek some advice from you in regards to the following questions:-

1) I found out there are many ways to cache a website content to make the website load faster. But I'm not sure which method is better than the others like for example HTTP Cookie and Server Caching. If a website like mine that uses MYSQL database and retrieve a lot of data to display on user's end, what caching solution is the best?

2) There are many PHP scripts available from the open source community and retail market. Some spec out the requirements and specifications in very details but unfortunately some don't. How can I be sure the script can support a big traffic site? Often I heard many scripts are written for website with small traffic in mind and they will start to behave strangely if the traffic started to grow.

Please do share your ideas and comments. Thank you.

Cheers,

dmcleary
25 Jan 2010, 09:13 AM
Hi junkeeper,

While I don't want to comment on the caching itself I would recommend that you *don't* cache information delivered via a database. If you try to, you run the risk of the information being out of date or incorrect for the user looking at it in cached version.

In fact most dynamic websites actively avoid caching by adding some lines the header.

Sorry it doesn't answer your questions directly but thought it was worth commenting on.

Regards,


David