Hi all, Yesterday I released a new Rails plugin: cached_models. It allows to transparently use the internal Rails cache mechanism in your models, avoiding to write code for expiring policies. Example class Project < ActiveRecord::Base has_many :developers, :cached => true end class Developer < ActiveRecord::Base belongs_to :project, :cached => true end # Automatic cache, all the following calls will be served by the cache. project.developers developer = project.developers.first developer.update_attributes :first_name => ''Luca'' # Database update and cache expiring for project. project2.developers << developer # Database update and cache expiring for project and project2 This is a 0.0.1 release, it actually support only the has_many relation. BTW I''d really like to receive a lot of feedbacks and comments. You can find all the documentation here: http://tinyurl.com/6e3mwk Ciao, -luca -- blog: www.lucaguidi.com Pro-Netics: www.pro-netics.com Sourcesense - making sense of Open Source: www.sourcesense.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Sep 11, 2008 at 12:47 AM, Luca Guidi <guidi.luca-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi all, > Yesterday I released a new Rails plugin: cached_models. > It allows to transparently use the internal Rails cache mechanism in > your models, avoiding to write code for expiring policies. > > Example > > class Project < ActiveRecord::Base > has_many :developers, :cached => true > end > > class Developer < ActiveRecord::Base > belongs_to :project, :cached => true > end > > # Automatic cache, all the following calls will be served by the cache. > project.developers > > > developer = project.developers.first > developer.update_attributes :first_name => ''Luca'' > # Database update and cache expiring for project. > > project2.developers << developer > # Database update and cache expiring for project and project2 > > > This is a 0.0.1 release, it actually support only the has_many relation. > BTW I''d really like to receive a lot of feedbacks and comments. >You can find all the documentation here: http://tinyurl.com/6e3mwk>Hi, this is good to hear and I''ll check it. -Conrad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- sub-folders security access question
- BUG: cannot move messages to root mailfolder in namespace "There can be only one namespace with inbox=yes"
- How many namespaces for several groups of shared mailboxes ?
- svnserve with encryption on CentOS
- sssd - ldap uid/gid does not match with uid/gids in the openLDAP DS