Daniel, Per cleared this up. This is my meaning. Apologies if I wasn't clear enough.
My existing app sets the user's display_name in the session. Along with knowing the user has been authenticated, many pages only additionally need to know the user's display_name. So for lots of pages, I do not need to have the user object loaded. thanks, Jon On Nov 7, 7:56 am, "Daniel N" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 7, 2008 at 10:49 AM, Per Melin <[EMAIL PROTECTED]> wrote: > > > >> This of course follows the default behavior of loading the user from > > >> DB every time authenticated? is called, which is every page rendering > > >> if you are following basic auth protections. This is highly > > >> inefficient and I would like to understand why it works this way > > > > This in no way fetches the user from the database each time. The user is > > > fetched from the session once if they are present. > > > I think the important part of "every time" was "every page rendering". > > For some applications it's a wasteful query to load the user object, > > which may not be used for anything else on every page, and just the > > fact that session[:user] is set could be enough to consider the user > > authenticated. > > Hey Per, > > Thanx for that clarification. I don't see any real issue with changing > this. I'll update it prior to 1.0. > > Thanx Per and Jon, > > Cheers > Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
