Re: [CDBI] has_many caching

Matt S Trout <dbix-class-uY5y5/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Daniel Williams wrote:
>  
> 
> It’s done multiple times inside of a template toolkit template. There is 
> definitely ways around it, but this makes the most sense for convenience 
> and functionality.

How about hacking the trigger that inflates the objects to maintain a weak 
reference back to the parent rather than a strong one?

Alternatively, hang on to the iterator which contains data rather than 
inflated objects.

<resists pointing out that this is just { cache => 1 } when you declare the 
relationship under DBIx::Class>

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.