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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]