Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MMcache, PHP caching and environmental variables

Status
Not open for further replies.

Maccaday

Technical User
Dec 9, 2003
71
GB
Hi,

I'm trying to optimise the speed of the php pages that are on my site, so intend on integrating an Open Source equivalent to Zend Studio, called Turck MMcache.

I want to cache both scripts and entire pages, but when I do the entire pages, I want to leave a couple of environmental variables uncached (such as which stylesheet to use for that user, and the user's ID), which will be stored in cookies and passed to Apache.

I am assuming that it is possible to cache the php file up to, but not including those variables (though I haven't actually written the PHP code to try it out yet). I was wondering, however, if performance would be higher if I were to cache the entire php page with Apache rather than MMcache (having compiled the scripts with MMcache)? The cached pages would then include a server include to add the environmental variables in Apache and not in PHP.

My questions therefore boil down to:

Which of these two routes is probably going to be run quicker, and if so, is there much of a difference between them?

Client > Apache > MMcache > SSI (to write env. var's) > Apache > Client

OR

Client > Apache > MMcache > PHP (to write env. var's) > Apache > Client

ANy comments will be gratefully received. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top