Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Peter Rabbitson
On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app that very frequently (pretty much every request) requires several DBIC resultsets that return a small number of values, that very rarely change. I'm trying to cache this, so I can update the cache when

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Peter Rabbitson
On Mon, Jan 14, 2013 at 09:26:04AM +0100, Alexander Hartmaier wrote: The resultset has a ref to the schema which in turn has one to its database connection which can't be serialized/cached. After unfreezing it you have to link the $rs back to a schema with a working database connection. I

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Jesse Sheidlower
On Mon, Jan 14, 2013 at 10:13:44PM +1100, Peter Rabbitson wrote: On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app that very frequently (pretty much every request) requires several DBIC resultsets that return a small number of values, that very

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Peter Rabbitson
On Mon, Jan 14, 2013 at 06:30:42AM -0500, Jesse Sheidlower wrote: On Mon, Jan 14, 2013 at 10:13:44PM +1100, Peter Rabbitson wrote: On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app that very frequently (pretty much every request) requires several

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Jesse Sheidlower
On Mon, Jan 14, 2013 at 11:06:56PM +1100, Peter Rabbitson wrote: On Mon, Jan 14, 2013 at 06:30:42AM -0500, Jesse Sheidlower wrote: On Mon, Jan 14, 2013 at 10:13:44PM +1100, Peter Rabbitson wrote: On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Peter Rabbitson
On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app that very frequently (pretty much every request) requires several DBIC resultsets that return a small number of values, that very rarely change. I'm trying to cache this, so I can update the cache when

[Dbix-class] Review request - branch for_current/cumulative

2013-01-14 Thread Peter Rabbitson
Please review and if no issues found merge [1]. More stuff will be coming down the pipe in the next few days... hopefully. [1] https://github.com/dbsrgits/dbix-class/compare/master...for_current;cumulative ___ List:

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread will trillich
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 jes...@panix.com wrote: unless ( $c-stash-{subjects} = $cache-get( 'subjects' ) ) { $c-stash-{subjects} =

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Jesse Sheidlower
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 jes...@panix.com wrote: unless ( $c-stash-{subjects} =

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Jesse Sheidlower
On Tue, Jan 15, 2013 at 01:30:55AM +1100, Peter Rabbitson wrote: On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app that very frequently (pretty much every request) requires several DBIC resultsets that return a small number of values, that very

Re: [Dbix-class] Caching a resultset?

2013-01-14 Thread Peter Rabbitson
On Mon, Jan 14, 2013 at 11:07:34AM -0500, Jesse Sheidlower wrote: On Tue, Jan 15, 2013 at 01:30:55AM +1100, Peter Rabbitson wrote: On Sun, Jan 13, 2013 at 11:35:06PM -0500, Jesse Sheidlower wrote: I have a Catalyst app that very frequently (pretty much every request) requires several