| CGI-Session-Driver-layered documentation | view source | Contained in the CGI-Session-Driver-layered distribution. |
CGI::Session::Driver::layered - Use multiple layered drivers
use CGI::Session;
my $session = CGI::Session->new("driver:layered", $sessionId, { Layers => [
{
Driver => 'file',
Directory => '/tmp/foo',
},
{
Driver => 'postgresql'
table => 'websessions',
handle => $dbh
}
]});
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.
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 (C) 2009 Liquidweb Inc.
Chris Reinhardt <creinhardt@liquidweb.com>
| CGI-Session-Driver-layered documentation | view source | Contained in the CGI-Session-Driver-layered distribution. |