6 messages in com.googlegroups.pylons-discussRe: Beaker session API "feature request"
FromSent OnAttachments
askel28 Jun 2008 21:45 
Jonathan Vanasco29 Jun 2008 15:29 
Mike Orr29 Jun 2008 15:38 
Jonathan Vanasco29 Jun 2008 18:49 
Ben Bangert29 Jun 2008 19:19 
Jonathan Vanasco29 Jun 2008 19:30 
Subject:Re: Beaker session API "feature request"
From:Jonathan Vanasco (jona@findmeon.com)
Date:06/29/2008 07:30:27 PM
List:com.googlegroups.pylons-discuss

On Jun 29, 10:20 pm, Ben Bangert <b.@groovie.org> wrote:

Nope, that's a bit tricky and depends greatly on deployment   environment. In a cluster, which machine runs the delete, how often,   if it just happens by default there's odd lock conditions, etc. It's   safer to let the person deploying it use the appropriate strategy.

Interesting points.

If you're using db session, it does store last accessed time for each   session. There's no reason you can't have a very simple SQL command   that runs every day to clear the ones with the accessed timestamp > 2   days or whatever.

So no shortcoming!

FWIW, in the past I've done this under modperl:

- delete in db based on last-accessed timestamp ( as we know now pylons has ) - delete on fs based on inode timestamps