[hunchentoot-devel] Expired sessions
Nico de Jager
ndj at hivsa.com
Thu Nov 30 17:14:21 UTC 2006
On Thursday 30 November 2006 18:06, Edi Weitz wrote:
> On Thu, 30 Nov 2006 17:53:32 +0200, Nico de Jager <ndj at hivsa.com> wrote:
> > How do I get rid of expired sessions in hunchentoot without deleting
> > valid sessions ("reset-sessions" invalidates and destroys all
> > sessions)?
> >
> > When looking at the sessions returned by "do-sessions", it seems
> > that expired sessions are only removed once a user tries to reuse
> > the expired session.
>
> Nope. See below.
Excellent. I could not determine this from the documentation.
>
> > But what if the user never revisits the site, will his/her expired
> > session remain in the session list? (Or remain at least until the
> > next call to "reset-sessions", which will also delete active
> > sessions). How do I identify expired sessions when traversing the
> > sessions with "do-session", or do I have to manually keep track of
> > this?
>
> Look at *SESSION-GC-FREQUENCY* and SESSION-GC. Does that help? I had
> plans to export them but somehow haven't done that yet. Do others
> think this would make sense, at least for the first symbol?
In my case I want to close the session's database connection when the session
expires and I was worried that this would only happen as described in my
previous post. Having these symbols will give finer control, though. If
SESSION-GC is exported then one can also control this per time period. But
the current behaviour is adequate for my needs.
Thanks a lot for your quick response.
Nico
More information about the Tbnl-devel
mailing list