On Sep 28, 2006, at 8:17 PM, John Siracusa wrote:

> There are a lot more cases than you might think.  Trying to  
> correctly detect
> and handle those on a case-by-case basis is error-prone.  Dividing all
> cached metadata by db neatly solves the problem at a relatively  
> small cost.

good explanation.

> Try modify_db()
>
> http://search.cpan.org/dist/Rose-DB/lib/Rose/DB.pm#modify_db
sweet.  thanks.

> It defaults to true under mod_perl but you can change it to  
> whatever you
> want.  If you turn it off, I suggest calling prime_all_caches()  
> manually at
> the end of startup.pl after you've loaded all your RDBO classes.
yeah, i'm already doing exactly that...
i just wanted to make sure everything happens a single connection.,  
not in connect/query/disconnect blocks.  i've got 141 rose db classes  
on one project and 264 on another ( go go massive db schemas in 3nf )  
-- and want to minimize the startup time.

> Or you could not call it at all.  It's just an optimization to  
> attempt to
> increase the amount of shared memory in each apache child.
hell no i'm calling it.  its awesome.

> There's no reason to do that.  None of the cached stuff changes when
> begin_work() or rollback() is called.
i just meant to encapsulate the db queries in a begin/rollback so  
nothing gets accidentally written.  i know your code isn't going to  
write anything, but I just like to toss everything in begin/rollbacks  
for safety.  ( granted, i'm connecting with a read only permissioned  
handle )


> The problem is, how would they know that the db was unregistered?
good point.  you'd need some sort of object registry and broadcast  
hook to handle that.

> ure, why not.  In the meantime, you can use the code you wrote in  
> your own
> custom metadata class.

already was :)




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to