Welcome to WebmasterWorld Guest from 54.166.33.25

Forum Moderators: coopster & jatar k

Pre-processing PHP/mySQL into straight html.

   
2:20 pm on Jun 5, 2006 (gmt 0)

5+ Year Member



Using PHP/mySQL to do multiple accesses to large tables uses a lot of resources when getting many concurrent hits. As others, my sites have dynamic data that changes sporadically, bi-hourly at best.

Here is the question:

Has anyone used file_get_contents & file_put_contents (or similar) to pre-render and save the straight HTML as the actual delivered pages?

This would save tons of PH and mySQL processing, speed up delivery and could be run as a CRON.

Any input would be useful.

3:43 pm on Jun 5, 2006 (gmt 0)

5+ Year Member



There are a multitude of caching solutions available - it is hardly worth bothering trying to "roll your own"
[google.com...]

If your data is not that dynamic, then a query cache (built into MySQL for example) will help if you have lots of identical queries being used, and a PHP cache like APC will help with PHP performance.

5:07 pm on Jun 5, 2006 (gmt 0)

5+ Year Member



There should be a new Murphy's Law:

The answer to your question will become immediately evident upon posting in a public forum.

Picked up PEAR Cache-Lite.
Using Output.php to cache complete pages indefinitely.
CRON jobs update underlying tables and delete the appropriate cache files.

duh....

(0.01 sec to render, 0.005 sec. from cache)

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month