My experience has been that large sites that need lots of db and file
access and that are heavily trafficked use a file caching solution. 

Results of db queries and dynamic pages are loaded into flat files which
the client then browses. This is the type of system used by sites that
get in the millions of hits per month. It's simple and it works.
Generally the database is the bottle neck. Using a file cache system
avoids using the db. Pretty straightforward.

The other strategy is to scale the hardware which is wise also. Sites
that get that many hits are generating $$$ so the cost of hardware is
cheap for them. They may have several gigs of memory per server and very
fast processors. These machines can handle very large peaks in activity.

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
Email: [EMAIL PROTECTED]
 

-----Original Message-----
From: Manuel Lemos [mailto:[EMAIL PROTECTED]] 
Sent: Monday January 21, 2002 10:07 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How should I cache database data for php?

Hello,

Jeff Bearer wrote:
> I want the app to query the caching layer just about the same way it
> queries the database, but add a few other details, time to live, cache
> name etc.  The caching layer will check to see if the query is cached,
> make sure it's not expired, and return the data just like a result set
> from the db query.  If it is expired, or doesn't exist then it will
> query and create the cache file for next time.
> 
> I'm leaning toward storing the data in XML, and kicking around the
idea
> of storing it on a ram disk so it would have killer fast access time.

XML? Why?

In my experience, using XML for things that need to scale is a major
mistake. If you want to serve HTML, why storing data in XML? You will
need to parse and transform it in HTML which only makes things much
worse than just storing data in nicely normalized database tables.

Regards,
Manuel Lemos

-- 
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]




-- 
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]

Reply via email to