[Dbix-class] Caching a resultset?
Jesse Sheidlower
jester at panix.com
Mon Jan 14 16:08:43 GMT 2013
On Mon, Jan 14, 2013 at 09:41:45AM -0600, will trillich wrote:
> 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} = $cache->get( 'subjects' ) ) {
> > $c->stash->{subjects} =
> > $c->model('WordsDB::Subject')->search();
> > $cache->set( 'subject', $c->stash->{subjects} );
> > }
> >
> >
> Note 'subject' vs 'subjects':
>
> $cache->set( 'subject', $c->stash->{subjects} );
That was my typo re-keying the actual code for the mailing list, the
original (which presents it differently, in a way not relevant for this
purpose) is correct. Sorry for the misleading example.
Jesse
More information about the DBIx-Class
mailing list