CGI::Session::Driver::memcached_mysql - CGI::Session driver for memcached and mysql



NAME

CGI::Session::Driver::memcached_mysql - CGI::Session driver for memcached and mysql


SYNOPSIS

    use CGI::Session;
    use DBI;
    use Cache::Memcached;
    
    $dbh = DBI->connect(
        'DBI:mysql:cgi_session;host=localhost', 'root', ''
    ) or die $DBI::errstr;
    $memcached = Cache::Memcached->new({
        servers => [ 'localhost:11211' ],
        debug   => 0,
        compress_threshold => 10_000,
    });
    $s = CGI::Session->new('driver:memcached_mysql', $sid,
                           { Memcached => $memcached, Handle => $dbh } );


DESCRIPTION

memcached_mysql stores session data into memcached and MySQL. It retrieves session data from memcached first. If that fails, then it retrives session data from MySQL. So CGI::Session::driver::memcached_mysql ensures your session data is stored into MySQL at least.


DRIVER ARGUMENTS

memcached_mysql supports all the arguments documented in CGI::Session::Driver::mysql and the CGI::Session::Driver::memcached manpage.


REQUIREMENTS

the CGI::Session manpage
the Cache::Memcached manpage


SEE ALSO

the CGI::Session::Driver::mysql manpage
the CGI::Session::Driver::memcached manpage


AUTHOR

Kazuhiro Oinuma <oinume@cpan.org>


COPYRIGHT AND LICENSE

Copyright (C) 2005 - 2006 Kazuhiro Oinuma <oinume@cpan.org>. All rights reserved. This library is free software. You can modify and or distribute it under the same terms as Perl itself.

 CGI::Session::Driver::memcached_mysql - CGI::Session driver for memcached and mysql