[Dbix-class] Caching a resultset?

will trillich will.trillich at serensoft.com
Mon Jan 14 15:41:45 GMT 2013


One problem I see with the exact code posted here is a typo referring to
singular-vs-plural on the hash key:

On Sun, Jan 13, 2013 at 10:35 PM, Jesse Sheidlower <jester at panix.com> wrote:

>
>   unless ( $c->stash->{subjects} =3D $cache->get( 'subjects' ) ) {
>     $c->stash->{subjects} =3D
>         $c->model('WordsDB::Subject')->search();
>     $cache->set( 'subject', $c->stash->{subjects} );
>   }
>
>
Note 'subject' vs 'subjects':

    $cache->set( 'subject', $c->stash->{subjects} );

-- =

Will Trillich :: 812.454.6431

=93Grading takes away all the fun from failing. And a huge part of education
is about failure.=94  -- Shimon Schocken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20130114/1ab=
88e93/attachment.htm


More information about the DBIx-Class mailing list