Catalyst::Plugin::Session::Store::BerkeleyDB - store sessions in a berkeleydb
package YourApp; use Catalyst qw/Session Session::State::Cookie Session::Store::BerkeleyDB/;
This module will store Catalyst sessions in a Berkeley database managed by BerkeleyDB::Manager. Unlike other storage mechanisms, sessions are never lost before their expiration time.
BerkeleyDB::Manager
To cleanup old sessions, you might want to make sure $c->delete_expired_sessions is run periodically.
$c->delete_expired_sessions
You can configure this module in a number of ways. By default, the module will create a Berkeley database called "catalyst_sessions" in a directory called "sessions" in your app's temp directory.
You can customize this, though, by setting the values of the "manager" and "database" keys in $c->config->{'Plugin::Session'}.
$c->config->{'Plugin::Session'}
The manager key can be either an instance of BerkeleyDB::Manager, or it can be a hash to pass to the constructor of BerkeleyDB::Manager. (Or it can be empty, and we will use sane defaults.)
manager
The database key can be the result of $manager->open_db( ... ), or it can be a string naming the database. By default, we use "catalyst_sessions".
database
$manager->open_db( ... )
Any other keys in the hash will be ignored by this module, but might be relevant to other session plugins.
Patches welcome!
You can get a copy of the repository by running:
$ git clone git://git.jrock.us/Catalyst-Plugin-Session-Store-BerkeleyDB
and you can view the repository in your web browser at:
http://git.jrock.us/?p=Catalyst-Plugin-Session-Store-BerkeleyDB.git;a=summary
BerkeleyDB
Jonathan Rockway <jrockway@cpan.org>
<jrockway@cpan.org>
Copyright (c) 2008 Infinity Interactive. This module is free software, you may distribute it under the same terms as Perl itself.
To install Catalyst::Plugin::Session::Store::BerkeleyDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Session::Store::BerkeleyDB
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Session::Store::BerkeleyDB
For more information on module installation, please visit the detailed CPAN module installation guide.