Igor Chudov <[EMAIL PROTECTED]> wrote: > I run algebra.com with a few thousand registered users and a lot more > unregistered. I use Apache::Session to store their session info. Right > now I clean sessions every month. I would like to be smarter and clean > sessions based on date information (ie remove sessions that are more > than 3 weeks old). > > Can I have a date as a relational column in the sessions table? > > I know that I could maintain a date in the session data blob, but, it > is expensive to use that for a few reasons. > > Right now it's been a couple of weeks, and I have 142,000 sessions.
Yep, you can do that quite easily. What database are you using? There's an example of how to subclass CGI::Session to update this information for you here: http://search.cpan.org/src/CRAKRJACK/Schema-RDBMS-AUS-0.03/lib/CGI/Session/Driver/aus.pm http://search.cpan.org/src/CRAKRJACK/Schema-RDBMS-AUS-0.03/lib/CGI/Session/AUS.pm Cheers, Tyler