On 7 Oct 2008, at 12:34, Chisel Wright wrote:

On Tue, Oct 07, 2008 at 12:08:03PM +0100, Raphael Mankin wrote:
The problem here is not with the ORM but rather that you are breaking
the MVC separation and putting controller logic in the view. A good ORM would have its data cached so that your test might not require two SQL queries. However, the template is, in this instance, the wrong place to
put the test.

I'm sure someone more knowledgeable can confirm, but I think the ORM
known as DBIC does indeed Cache Stuff.

Yes, I know DBIC is not the only ORM.

Can cache stuff. Does not by default. Caching is hard (you have to invalidate it etc. etc.)

See:

http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/ResultSet.pm#set_cache
http://search.cpan.org/~mstrout/DBIx-Class-Cursor-Cached-1.0.1/lib/DBIx/Class/Cursor/Cached.pm

for some of the ways caching can be done.

Reply via email to