CGI::Session::Driver::layered - Use multiple layered drivers


CGI-Session-Driver-layered documentation  | view source Contained in the CGI-Session-Driver-layered distribution.

Index


NAME

Top

CGI::Session::Driver::layered - Use multiple layered drivers

SYNOPSIS

Top

 use CGI::Session;

 my $session = CGI::Session->new("driver:layered", $sessionId, { Layers => [
   {
     Driver    => 'file',
     Directory => '/tmp/foo',
   },
   {
     Driver => 'postgresql'
     table  => 'websessions',
     handle => $dbh
   }
 ]});

DESCRIPTION

Top

CGI::Session::Driver::Layered provides a interface for using multple drivers to store sessions. Each session is stored in all the configured drivers. When fetching a session, the driver with the most recent copy of the session is used. The drivers are searched in the order they were configured.

OPTIONS

Top

Unlike most drivers for CGI::Session, this driver requires options to function. The driver args must has a layers field, which is an array ref of hash references. Each hash reference should contain the driver name under the key driver, and the rest of the arguments for that driver. The order of the layers argument is the order that the layer will check during a retrieve.

COPYRIGHT

Top

AUTHOR

Top

Chris Reinhardt <creinhardt@liquidweb.com>

SEE ALSO

Top

CGI::Session::Driver, CGI::Session


CGI-Session-Driver-layered documentation  | view source Contained in the CGI-Session-Driver-layered distribution.