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.
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.