This project is archived and is in readonly mode.

#3099 ✓invalid
Jamie Rumbelow

ActiveRecord::ObjectMap - Identity Map for AR

Reported by Jamie Rumbelow | August 26th, 2009 @ 05:21 PM

I've created an Identity Map implementation for ActiveRecord. It's pretty basic right now, it's essentially a cache, but it works pretty well. I've written documentation for it too, and added some options to the find methods (:fresh, :be_fresh and :stay_fresh) to make requests be pulled straight from the database, not be cached, or both, respectively.

It's up in my Rails GitHub Fork under the object_map branch, so please check it out and let me know what you think:

[url=http://github.com/jamierumbelow/rails/tree/object_map]http://github...]

Comments and changes to this ticket

  • David Trasbo

    David Trasbo April 11th, 2010 @ 09:30 PM

    • Assigned user set to “Ryan Bigg”

    The repository that Jamie links to doesn't exist anymore. This ticket can be closed, unless you want to re-create the repository and show us your work, Jamie?

  • Ryan Bigg

    Ryan Bigg April 11th, 2010 @ 09:33 PM

    • State changed from “new” to “open”

    I have heard core members say that this is not a goal for 3.x, but has been tried to be implemented. Jamie, if you could apply your changes to the latest Rails 3 and submit the repository again, that would be helpful.

  • Jamie Rumbelow

    Jamie Rumbelow April 11th, 2010 @ 11:34 PM

    I'd love to be able to contribute... I posted this quite a long time ago and never got a response so gave up hope, and have subsequently lost the implementation. If there is still interest, I'm happy to have another go at implementing it. I'm much more confident in Ruby now, so it'll be good to see what I come up with.

    Jamie

  • Ryan Bigg

    Ryan Bigg April 12th, 2010 @ 12:08 AM

    This was a point of discussion at Scotland Ruby Conference and I think in many other places too. Please work on this.

  • Pratik

    Pratik April 12th, 2010 @ 12:29 AM

    • State changed from “open” to “invalid”

    While I like the concept itself, I'm not ( yet ) convinced it belongs to core. At least not without being a plugin first. Maybe you could release it as a plugin and get people's feedback from the Rails core mailing list - http://groups.google.com/group/rubyonrails-core - and we can see where it goes from there.

  • Jamie Rumbelow

    Jamie Rumbelow April 12th, 2010 @ 01:48 PM

    Okay, I'll build a plugin that adds this functionality to ActiveRecord instead of writing it straight into the core. I'll update this ticket with the repository information.

  • Pratik

    Pratik April 12th, 2010 @ 01:50 PM

    Do make sure to post about it in the core ML as that'll see more eyes than this ticket.

  • Jeremy Kemper

    Jeremy Kemper April 15th, 2010 @ 08:28 PM

    Jamie, I hope to see your proposal at http://rubysoc.org/students soon :)

  • Jeremy Holland

    Jeremy Holland February 19th, 2011 @ 08:14 PM

    Was there every any further work/discussion on this? If nobody's aware of any, I'll try to tackle the issue (in a plugin, to start), but I don't want to be duplicating effort.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages