On Tue, Jun 24, 2008 at 06:46:38PM +0100, David Cantrell wrote:
> I've been mumbling on IRC over the last week or two about rows being
> singletons when they get loaded into memory. This is mostly because,
> when writing tests for a DBIx::Class based project I got irritated when
> I had two references to the same row hanging around in memory, update()d
> one of them, but the other still had old data in it.
> Here's my fix:
This is probably something else that would work well with the ResultSource
refactor I just mentioned upthread wrt caching stuff.
Hm. Wouldn't you be better using the "keep weak refs and then clean 'em
up via a mark-and-sweep every so often" approach that CDBI's LiveObjectIndex
does? The whole refcounting thing seems like much more work, and maybe
even -more- fragile than the LOI used to be.