CGI::Session::Driver::memcached_mysql - CGI::Session driver for memcached and mysql
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 } );
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.
memcached_mysql supports all the arguments documented in CGI::Session::Driver::mysql and CGI::Session::Driver::memcached.
Kazuhiro Oinuma <oinume@cpan.org>
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.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install CGI::Session::Driver::memcached_mysql, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Session::Driver::memcached_mysql
CPAN shell
perl -MCPAN -e shell install CGI::Session::Driver::memcached_mysql
For more information on module installation, please visit the detailed CPAN module installation guide.