[CDBI] has_many caching

Matt S Trout dbix-class at trout.me.uk
Sun Apr 16 16:11:14 BST 2006

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/ +

More information about the ClassDBI mailing list