Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveRecord::ObjectMap - Identity Map for AR

#3099

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...]

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

State: invalid
Milestone: none
Assigned to: Ryan Bigg Ryan Bigg
Importance: none

Activity

  1. David Trasbo
    David Trasbo
    • 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?

    April 11th, 2010 @ 09:30 PM

  2. Ryan Bigg
    Ryan Bigg
    • 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.

    April 11th, 2010 @ 09:33 PM

  3. Jamie Rumbelow
    Jamie Rumbelow

    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

    April 11th, 2010 @ 11:34 PM

  4. Ryan Bigg
    Ryan Bigg

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

    April 12th, 2010 @ 12:08 AM

  5. Pratik
    Pratik
    • 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.

    April 12th, 2010 @ 12:29 AM

  6. Jamie Rumbelow
    Jamie Rumbelow

    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.

    April 12th, 2010 @ 01:48 PM

  7. Pratik
    Pratik

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

    April 12th, 2010 @ 01:50 PM

  8. Jeremy Kemper
    Jeremy Kemper

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

    April 15th, 2010 @ 08:28 PM

  9. Jeremy Holland
    Jeremy Holland

    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.

    February 19th, 2011 @ 08:14 PM