On Thu, Sep 4, 2008 at 7:36 PM, Ben Bangert <[EMAIL PROTECTED]> wrote:
> Setting a specific expiretime should do it, unfortunately this value needs > to be a timedelta or datetime value, so in your projects lib/environment.py, > after the config.init function was called, add: > > from datetime import timedelta > config['beaker.session.cookie_expires'] = timedelta(minutes=20) > > And that should do the trick. > I tried this, but it basically invalidates all session activity. I have no funky cookie-blockers or anything in my browser. If I make a new, empty controller, and in the index action simply set a var into session, call session.save() and then check for it after a reload, it's gone. Is there something else that I need? But, even if it worked, a couple of things: 1. Doesn't it seem like something like this should be the default? Sessions should stay alive 'till they're explicitly timed out. A server restart shouldn't kill 'em. I doubt that would be expected behavior. For example, users shouldn't be logged out if a cron job wants to rotate logs or something. 2. It seems like even as above, it's broken. It *seems* like it's timing out 20 minutes after the session starts, not 20 minutes after the session has last been used. At least, that's what's happening to me... if this is not what you've coded, then I'm still having problems. Other frameworks that I've used don't rely on cookies/browsers/clients to expire a session; they manage session state themselves. This is what I'd like to do in pylons/buffet. Thanks again. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---