[Dbix-class] DBIx::Class and caching

Oleg Pronin syber.rus at gmail.com
Thu Jul 3 15:17:07 BST 2008


I didn't want to affend you, sorry. But

>> but then I'd argue that you shouldn't be doing that anyway.
i dont agree. This is a great technic in many cases.

>> And no it doesn't have to construct a row object if you don't want to See

>> <
http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/ResultClass/H=
ashRefInflator.pm<http://search.cpan.org/%7Eash/DBIx-Class-0.08010/lib/DBIx=
/Class/ResultClass/HashRefInflator.pm>
>.

Then you will get a hash, not an object.

>> Yes object construction can be expensive, but its what you want most of
the time. If you >> dont want objects don't use an ORM. (The 'O' there
stands for Object, dontcha know.)

I posted a solution which caches already constructed objects in MEMD. You
get objects! Without a need to construct then every time you get data from
MEMD.
However DBIC::C::C will construct the same objects from DB data from cache
THOUSAND TIMES, again and again - this is stupid! don't you see?
You think it is normal that when you start using C::C you get more local CPU
usage than without it ? (it's not about Database CPU or disk usage, only
perl-side).
I think it's NOT.

>> Which solution? Link to archives please.
somewhy i cannot find it in archives. I will repost it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080703/080=
f095f/attachment.htm


More information about the DBIx-Class mailing list