RE: [PHP] Cache Database-driven site

From: Date: Tue, 13 Mar 2001 01:19:34 +0000
Subject: RE: [PHP] Cache Database-driven site
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43590@lists.php.net to get a copy of this message
There are already some caching packages out there, I'm not sure how they perform with CGI (look into Squid). Having each page check for a cached version of itself sounds like a complicated approach. Another idea is to generate portions of your site as that don't change often from perl scripts, and run these from cron. Using server-side-includes can make this a much easier process. -----Original Message----- From: Joachim Maier [mailto:JMaier@maiersoft.de] Sent: Monday, March 12, 2001 4:20 PM To: php-general@lists.php.net Subject: [PHP] Cache Database-driven site Hi all, i'm appreciating any comments on this idea: I'm about to create a completely database driven site (mySQL). Almost all of the output is generated from database data. A big part of the data is rather static of nature, eg. updated once a month. A smaller part is quite dynamic, e.g. content is added daily. Now the problem: My webhoster's database server (not the webserver!) is nearly breaking down in high-traffic-times. While static sites are performing fine, my site is almost down :-(( Here my idea: I thought of creating a cache-mechanism where each php-page checks for the existence of a static html-cache-page that holds its contents. When the page is there it is read and echoed out to the browser. If it isn't there, it shall be created automatically. To create the HTML-cache page i need to build the whole HTML-page content in memory, instead of echoing it back to the user's browser, and finally write it to disk. That means, i have to write all HTML in php-code. I can't just embed php-parts in html tags. I'm not sure, whether this is the right way to go, as i can see some major drawbacks of this approach, although my general php-architecture is template oriented, which would make the approach practical. I would really appreciate some comments on this. Thanks in advance, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43590) next »