Apache::Session::SharedMem(3)

NAME
Apache::Session::SharedMem - Session management via shared memory

SYNOPSIS
 use Apache::Session::SharedMem;

 tie %s, 'Apache::Session::SharedMem', $sessionid, { expires_in => 86400 }

DESCRIPTION
This module is an implementation of Apache::Session. It uses IPC::Cache to store session variables in shared memory.

The advantage of this is that it is fairly fast (about the same speed, if not faster than Apache::Session::File and is very easy to set up making it perfect for when you want to test sessions but can't be bothered to set up a database or don't want cgi scripts writing temp files.

  CAVEATS
It probably isn't very scaleable (i.e you probably shouldn't use this in production code which is going to get hit hard.

I have no idea if it leaks memory yet. I've only just written it :)

Apparently it IPC::ShareLite (and hence IPC::Cache) don't work under Perl 5.6.

USAGE
Just the same as all the other Apache::Session modules. You can optionally pass the parameter expires_in which will tell the Session to expire in a certain time.

PREREQUISITES
Apache::Session::SharedMem needs Apache::Session and IPC:Cache, both available from the CPAN.

AUTHOR
Simon Wistow <simon@twoshortplanks.com>

COPYRIGHT
This software is copyright(c) 2000, 2001, 2002 Simon Wistow. It is free software and can be used under the same terms as perl, i.e. either the GNU Public Licence or the Artistic License.

SEE ALSO
Apache::Session, IPC::Cache