>     1. Is the reference to the user storable?

Yes, but it will store the complete user object in the database, not
just a reference.

>     2. Do I need to create more columns in the table or everything
goes
>        to the "a_session" column?

The latter.

>     3. Could one set up things in a way that allows the database to
see
>        the timestamps and program a trigger to delete old sessions?

Yes.  You will have to hack the Apache::Session code to do it, but it's
not very hard.  Just make it store a timestamp in a different table.  Or
put a trigger in the database to update a timestamp column when the
a_session column gets updated.

However, this implies that every time a user accesses a page you will be
updating his session.  That's not true for most sites.  If you really
need an accurate time for when the user last accessed a page, you will
have to make sure to update his session every time.  See the information
on forcing an update in the Apache::Session docs.

- Perrin

Reply via email to