| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Pre-processing PHP/mySQL into straight html.|
| 2:20 pm on Jun 5, 2006 (gmt 0)|
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)|
There are a multitude of caching solutions available - it is hardly worth bothering trying to "roll your own"
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)|
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.
(0.01 sec to render, 0.005 sec. from cache)
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved