| CGI-MxScreen documentation | view source | Contained in the CGI-MxScreen distribution. |
CGI::MxScreen::Session::Medium - Abstract session saving medium
# Not meant to be used directly
This class is deferred, and is meant to be inherited from by classes implementing the various session media.
The following session media are currently supported:
CGI::MxScreen::Session::Medium::BrowserThis 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::FileThis saves the session within a file, on the server side. See CGI::MxScreen::Session::Medium::File for configuration details.
CGI::MxScreen::Session::Medium::Raw_FileThis 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.
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.
These features need to be defined by heirs:
is_available session_idLooks 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.
makeThe creation routine, whose interface will necessarily be different for every medium.
retrieve session_idRetrieve context by session ID, and return a reference to it.
session_idRetrieve session ID from the CGI environment (probably in some hidden
parameter). If there's no session ID there, return undef.
store session_id, contextStore context by session ID.
It returns a hash ref of (parameter => value) tuples to be generated as hidden parameters to identify the session.
The only attribute is:
serializerThe CGI::MxScreen::Serializer object to use for serialization.
It is initialized by CGI::MxScreen::Session with a set_serializer() call.
Raphael Manfredi <Raphael_Manfredi@pobox.com>
CGI::MxScreen::Session::Medium::Browser(3), CGI::MxScreen::Session::Medium::File(3), CGI::MxScreen::Session::Medium::Raw_File(3).
| CGI-MxScreen documentation | view source | Contained in the CGI-MxScreen distribution. |