Are you using the MasonX session package, or something hand-rolled?
Personally I like CGI::Session for handling sessions, and it will take
care of expiration for you.
On Oct 21, 2008, at 3:35 AM, Louis-David Mitterrand wrote:
> Hi,
>
> I have just added some code in my handler.pl to expire idle sessions
> after 1 hour and thought I'd submit it to the list for review. The
> 'critik' $session key contains all login details.
>
> my $m = $ah->prepare_request($r);
>
> my $status = $m->exec;
>
> my $time = time();
> if ($time - $HTML::Mason::Commands::session{TIMESTAMP} > 3600) {
> delete($HTML::Mason::Commands::session{critik})
> }
> $HTML::Mason::Commands::session{TIMESTAMP} = $time;
>
>
> untie %HTML::Mason::Commands::session;
>
> return $status;
>
> Is that the best way to do it?
>
> Thanks,
>
> --
> http://www.lesculturelles.net
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users