On Mon, Aug 19, 2002 at 06:54:01PM -0700, md wrote:
> I can definitely get it all from the db, but that doesn't
> seem very efficient.

Don't worry about whether it *seems* efficient. Do it right, and then
worry about how to speed that up - if, and only if, it's too slow.

Premature optimisation is the root of all evil, and all that ..

At BlackStar the session was just a single hashed ID and all other info
was loaded from the database every time. We thought about caching some
info a few times, but always ran into problems with replication.  In the
end we discovered that fetching everything from the database on every
request wasn't noticeably slower than anything else we could up with,
and was a lot more flexible. Throwing more memory at the database servers
was usually quicker, cheaper and more effective than micro-optimising
our session vs caching strategy...

Tony

Reply via email to