NAME

CGI::MxScreen::Session::Medium - Abstract session saving medium

SYNOPSIS

 # Not meant to be used directly

DESCRIPTION

This class is deferred, and is meant to be inherited from by classes implementing the various session media.

SUPPORTED MEDIA

The following session media are currently supported:

CGI::MxScreen::Session::Medium::Browser

This saves the session within the browser, and therefore does not require any storage on the server side. See CGI::MxScreen::Session::Medium::Browser for configuration details.

CGI::MxScreen::Session::Medium::File

This saves the session within a file, on the server side. See CGI::MxScreen::Session::Medium::File for configuration details.

CGI::MxScreen::Session::Medium::Raw_File

This saves the session within a file, on the server side, but bypasses the CGI::MxScreen::Serializer interface alltogether to make raw Storable calls, i.e. store() and retrieve().

This is more efficient but prevents any compression (which a CPU intensive task anyway). As often, we're sacrifying space and genericity for performance. See CGI::MxScreen::Session::Medium::Raw_File for configuration details.

INTERFACE

This section is meant for developpers wishing to implement their own session medium. You don't need to read it if you're only using CGI::MxScreen.

Deferred Features

These features need to be defined by heirs:

is_available session_id

Looks whether session_id is a free session ID. If it is, atomically reserve it.

Must return true when the ID was reserved, false if it is not available.

make

The creation routine, whose interface will necessarily be different for every medium.

retrieve session_id

Retrieve context by session ID, and return a reference to it.

session_id

Retrieve session ID from the CGI environment (probably in some hidden parameter). If there's no session ID there, return undef.

store session_id, context

Store context by session ID.

It returns a hash ref of (parameter => value) tuples to be generated as hidden parameters to identify the session.

Attributes

The only attribute is:

serializer

The CGI::MxScreen::Serializer object to use for serialization. It is initialized by CGI::MxScreen::Session with a set_serializer() call.

AUTHOR

Raphael Manfredi <Raphael_Manfredi@pobox.com>

SEE ALSO

CGI::MxScreen::Session::Medium::Browser(3), CGI::MxScreen::Session::Medium::File(3), CGI::MxScreen::Session::Medium::Raw_File(3).