[Dbix-class] Resultset with memcached

Tobias Kremer list at funkreich.de
Wed Jan 9 08:27:16 GMT 2008

>  Couldn't render template "undef error - Can't call method "source" on an
> undefined value at
> /usr/lib/perl5/site_perl/5.8/DBIx/Class/ResultSourceHandle.pm line 64.

You lost your ResultSource. This is normal when storing ResultSets in a cache
AFAIK. Use DBIx::Class::Cursor::Cached (works great) or reset the
ResultSource after fetching your data from the cache. If my memory serves you
can do that like this:

my $rs = $c->cache->get( 'cachekey' );
$rs->result_source( $c->model( 'MyModel' )->source( 'result_source_classname' )

Maybe there is an even simpler way ...



More information about the DBIx-Class mailing list