[tbnl-devel] Re: TBNL Example
Edi Weitz
edi at agharta.de
Fri Feb 25 21:51:17 UTC 2005
On Fri, 25 Feb 2005 22:35:18 +0100, Stefan Scholl <stesch at no-spoon.de> wrote:
> But I hope the session will be removed at some time, even when
> nobody tries to access an expired session?
Yes, see the code for SESSION-GC. It will be removed at some time
unless nobody tries to access any session at all, whether expired or
not.
To make this more clear:
1. Whenever you try to access an expired session it will be
automatically removed and thus your Lisp is free to garbage-collect
it now.
2. Whenever any session whatsoever is accessed a global counter is
increased and at certain intervals (there's a special variable for
that but I don't think it's exported) all sessions which are
expired will be removed even if their users haven't accesses them.
This implies that sessions might stay in the Lisp image for a long
time (although expired) /if/ there's no traffic /or/ if there's only
traffic that doesn't use sessions.
The alternative would be a separate thread which checks for expired
session independently of server traffic. I think that's overly
complex, though, and the benefit of the current solution is that it
kind of automatically adapts to the server load.
Cheers,
Edi.
More information about the Tbnl-devel
mailing list