perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <tomAtLi...@gmx.at>
Subject Re: Hash Cache using Require
Date Sat, 04 Dec 2004 12:51:24 GMT
Perrin Harkins wrote:
> On Fri, 2004-12-03 at 11:17 -0800, Bill Whillers wrote:
> 
>>Am I more or less efficient than just creating the hashes directly from 
>>hitting the database everytime the application needs it? The database is 
>>*not* under heavy load, at all.
> 
> 
> If the data is small enough, loading it into memory should work fine,
> and will be faster than loading from the database.  If you only need
> access to specific items at any given time, I'd read those individually
> from the database or use a local dbm file (try MLDBM::Sync or
> BerkeleyDB) because it will save you memory over loading the full hash
> in each process.

I'd suggest reading the data from the mysql database directly and 
keeping it in memory. You've many possibilities to check whether the 
data in the database has been modified. e.g. by setting a 
update-timestamp which you request.

Tom


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message