I love the authorization[1] plugin and use it in all my RoR applications to enhance acts_as_authenticated with roles. My biggest problem with it was that it queries the DB for every permit or has_role? function call. On some pages i needed to check roles multiple times and the database load would have made it unusable in production environments. The attached patch caches the current_user''s roles at every page load. This is my first RoR plugin patch, so if anyone is interested i would love it if it got tested a little. At present it only caches current_user''s roles, in a future version i could enhance it cache every permit? or has_role? call Cheers, Radu Spineanu [1] http://www.writertopia.com/developers/authorization --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---