On Tuesday 28 June 2005 08:13, Bas Scheffers wrote:

> I'll have a look at the nscache module and see what I can do on creating
> sessions in Tcl this week. I am not a heavy user of them, but some "light"
> information like user_id and name and such will save me a roundtrip to the
> DB on every page.

Here are some ideas using a file based storage:

<http://rmadilo.com/m2/servers/rmadilo/modules/tcl/twt/packages/session/tcl/>

It uses file age to determine if the session has expired. There is currently
no cleanup of old sessions, you would have to figure out the details of that.

Files are protected by condition variables, and sessions share these. As
currently configured, there are 16 (one for each hex digit), but it is easy
to add more.

Underlying the session procs is something I'm calling datastore (which handles
all the details of creation of session store, mutex, etc.). It is also the
basis of form handler, which stores all data collected via forms until it is
ready to be sent to the database (mostly for multi step forms so you don't
have to constantly sign and re-verify form data). The form handler isn't
finished yet.

I also have a module/package called auth which stores basic user data in a
file. It uses the same underlying datastore code, but is tied into sessions
as well.

Oh, in relation to that, sessions have a 'type'. Auth only verifies the
user/password, but session has methods to change the session type once auth
is done.

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to