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


Apache-Session-SharedMem documentation  | view source Contained in the Apache-Session-SharedMem distribution.

Index


NAME

Top

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

SYNOPSIS

Top

 use Apache::Session::SharedMem;

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

DESCRIPTION

Top

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

Top

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

Top

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

AUTHOR

Top

Simon Wistow <simon@twoshortplanks.com>

COPYRIGHT

Top

SEE ALSO

Top

Apache::Session, IPC::Cache


Apache-Session-SharedMem documentation  | view source Contained in the Apache-Session-SharedMem distribution.