Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Serialize a resultset?

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


orasnita at gmail

Oct 27, 2009, 12:21 AM

Post #1 of 2 (239 views)
Permalink
Serialize a resultset?

Hi,

Can a DBIC resultset be serialized in order to be stored in the cache?

With other words, is it possible to do:

my $cache = $c->cache;
my $feeds = $cache->get($pg);

unless (defined $feeds) {
$feeds = $c->model("DB::Feed")->get_feeds($pg);
$cache->set($pg, $feeds, 10);
}

Thank you.

--
Octavian


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Oct 27, 2009, 3:00 AM

Post #2 of 2 (213 views)
Permalink
Re: Serialize a resultset? [In reply to]

On 27 Oct 2009, at 07:21, Octavian Râșniță wrote:

> Hi,
>
> Can a DBIC resultset be serialized in order to be stored in the cache?
>

This is a dbix::class question, not a Catalyst question.

But, nonetheless, why not just use
DBIx::Class::ResultClass::HashRefInflator

Cheers
t0m


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.