homepage Welcome to WebmasterWorld Guest from 54.198.224.121
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Pre-processing PHP/mySQL into straight html.
NotNeYzer




msg:1299504
 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.

 

FalseDawn




msg:1299505
 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"
[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.

NotNeYzer




msg:1299506
 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.

duh....

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved