Ed Lazor wrote:

Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it
statically in order for pages to display more quickly when visitors access
the site?  If so, what solutions are you using to achieve this?



Thanks,



Ed


Hey Ed, there are a couple of ways that you can do it depending on your needs. Probably the easiest way to do it is to generate the entire page once and cache it for some period of time (1 hour?) and then serve that page until you determine it should expire.


OR

You could create a static part of a page and a dynamic part of a page. HTML works best for the static part (obviously :) and then you just get the php code you need for the dynamic. If this is your choice, then you'll probably want to cache MySQL query results and as much of the personalized user information as possible - dbm files can work well for this.

OR

If there isn't much personal information (but a lot of users... you DO have a lot of users right? ;) you can be really stingy and store some user data in a cookie. Usual rules for cookies apply here, but basically if you have very little personalized info needed for every page then this can be more efficient than db calls.

OR

Try using one of the software packages out there that cache php byte code (especially if you have a lot of includes). If you absolutely demand dynamic generation and want a performance boost, Zend can help you out a lot in this department.

OR

Some other solution someone more clever than I has come up with :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to